From 512d8b760d67874aff8af6c2a3be2cd59c133694 Mon Sep 17 00:00:00 2001 From: Saksham Agrawal <40560369+saksham115@users.noreply.github.com> Date: Fri, 14 Nov 2025 23:34:20 +0530 Subject: [PATCH 1/4] KU_* renaming --- extension/algo/src/function/louvain.cpp | 4 +- .../algo/src/function/spanning_forest.cpp | 12 +- ...strongly_connected_components_kosaraju.cpp | 16 +- .../algo/src/include/function/component_ids.h | 8 +- extension/azure/src/function/azure_scan.cpp | 2 +- extension/delta/src/function/delta_scan.cpp | 2 +- .../catalog/duckdb_table_catalog_entry.cpp | 2 +- .../src/connector/connector_factory.cpp | 2 +- .../duckdb/src/connector/duckdb_connector.cpp | 2 +- .../src/connector/duckdb_result_converter.cpp | 4 +- .../src/connector/duckdb_secret_manager.cpp | 2 +- .../src/catalog/fts_index_catalog_entry.cpp | 2 +- .../fts/src/function/create_fts_index.cpp | 2 +- .../fts/src/function/fts_index_utils.cpp | 2 +- .../fts/src/function/query_fts_index.cpp | 10 +- extension/fts/src/function/stem.cpp | 2 +- .../include/function/query_fts_bind_data.h | 2 +- extension/fts/src/index/fts_index.cpp | 2 +- extension/fts/src/main/fts_extension.cpp | 2 +- extension/httpfs/src/http_config.cpp | 2 +- extension/httpfs/src/httpfs.cpp | 2 +- extension/httpfs/src/s3fs.cpp | 2 +- .../iceberg/src/function/iceberg_bindfunc.cpp | 2 +- .../creation_functions/json_object.cpp | 2 +- .../functions/creation_functions/to_json.cpp | 2 +- .../extract_functions/json_extract.cpp | 6 +- .../scalar_functions/json_array_length.cpp | 2 +- .../scalar_functions/json_contains.cpp | 12 +- .../functions/scalar_functions/json_keys.cpp | 2 +- .../functions/table_functions/json_scan.cpp | 28 +- .../json/src/reader/buffered_json_reader.cpp | 6 +- extension/json/src/utils/json_utils.cpp | 10 +- .../neo4j/src/function/neo4j_migrate.cpp | 2 +- .../vector/src/function/create_hnsw_index.cpp | 2 +- .../vector/src/function/query_hnsw_index.cpp | 30 +- .../vector/src/include/index/hnsw_graph.h | 16 +- .../vector/src/include/index/hnsw_index.h | 6 +- extension/vector/src/index/hnsw_config.cpp | 2 +- extension/vector/src/index/hnsw_graph.cpp | 44 +- extension/vector/src/index/hnsw_index.cpp | 40 +- .../vector/src/index/hnsw_index_utils.cpp | 10 +- .../src/index/hnsw_rel_batch_insert.cpp | 10 +- .../vector/src/main/vector_extension.cpp | 2 +- scripts/antlr4/Cypher.g4 | 374 +- scripts/antlr4/hash.md5 | 2 +- src/antlr4/Cypher.g4 | 374 +- src/binder/bind/bind_ddl.cpp | 6 +- src/binder/bind/bind_export_database.cpp | 4 +- src/binder/bind/bind_extension.cpp | 2 +- src/binder/bind/bind_extension_clause.cpp | 2 +- src/binder/bind/bind_file_scan.cpp | 4 +- src/binder/bind/bind_graph_pattern.cpp | 8 +- src/binder/bind/bind_import_database.cpp | 8 +- src/binder/bind/bind_projection_clause.cpp | 8 +- src/binder/bind/bind_query.cpp | 2 +- src/binder/bind/bind_reading_clause.cpp | 2 +- .../bind/bind_standalone_call_function.cpp | 2 +- src/binder/bind/bind_updating_clause.cpp | 10 +- src/binder/bind/copy/bind_copy_from.cpp | 8 +- .../bind_comparison_expression.cpp | 2 +- .../bind_function_expression.cpp | 2 +- .../bind_subquery_expression.cpp | 2 +- src/binder/binder.cpp | 10 +- src/binder/binder_scope.cpp | 2 +- src/binder/bound_scan_source.cpp | 2 +- src/binder/bound_statement_visitor.cpp | 8 +- src/binder/expression/expression_util.cpp | 6 +- src/binder/expression/node_expression.cpp | 2 +- src/binder/expression/property_expression.cpp | 2 +- src/binder/expression_binder.cpp | 2 +- src/binder/query/query_graph.cpp | 2 +- src/binder/visitor/property_collector.cpp | 4 +- src/catalog/catalog.cpp | 16 +- src/catalog/catalog_entry/catalog_entry.cpp | 2 +- .../catalog_entry/catalog_entry_type.cpp | 4 +- .../catalog_entry/rel_group_catalog_entry.cpp | 6 +- .../catalog_entry/sequence_catalog_entry.cpp | 4 +- .../catalog_entry/table_catalog_entry.cpp | 6 +- src/catalog/catalog_set.cpp | 10 +- .../property_definition_collection.cpp | 10 +- src/common/arrow/arrow_array_scan.cpp | 20 +- src/common/arrow/arrow_null_mask_tree.cpp | 4 +- src/common/arrow/arrow_row_batch.cpp | 10 +- src/common/arrow/arrow_type.cpp | 14 +- .../copier_config/csv_reader_config.cpp | 8 +- src/common/copier_config/reader_config.cpp | 2 +- src/common/data_chunk/data_chunk.cpp | 2 +- src/common/data_chunk/sel_vector.cpp | 2 +- src/common/enums/accumulate_type.cpp | 2 +- src/common/enums/conflict_action.cpp | 2 +- src/common/enums/drop_type.cpp | 2 +- src/common/enums/extend_direction_util.cpp | 2 +- src/common/enums/path_semantic.cpp | 2 +- src/common/enums/query_rel_type.cpp | 4 +- src/common/enums/rel_direction.cpp | 4 +- src/common/enums/rel_multiplicity.cpp | 2 +- src/common/enums/scan_source_type.cpp | 2 +- src/common/enums/table_type.cpp | 2 +- src/common/enums/transaction_action.cpp | 2 +- src/common/expression_type.cpp | 4 +- src/common/file_system/file_system.cpp | 14 +- src/common/file_system/gzip_file_system.cpp | 6 +- src/common/file_system/local_file_system.cpp | 18 +- .../file_system/virtual_file_system.cpp | 12 +- src/common/null_mask.cpp | 6 +- src/common/serializer/buffered_file.cpp | 2 +- src/common/serializer/deserializer.cpp | 6 +- src/common/serializer/in_mem_file_writer.cpp | 2 +- src/common/serializer/serializer.cpp | 2 +- src/common/task_system/task_scheduler.cpp | 2 +- .../terminal_progress_bar_display.cpp | 2 +- src/common/type_utils.cpp | 2 +- src/common/types/date_t.cpp | 14 +- src/common/types/dtime_t.cpp | 2 +- src/common/types/interval_t.cpp | 2 +- src/common/types/types.cpp | 56 +- src/common/types/uint128_t.cpp | 4 +- src/common/types/value/value.cpp | 30 +- src/common/vector/auxiliary_buffer.cpp | 2 +- src/common/vector/value_vector.cpp | 26 +- src/expression_evaluator/case_evaluator.cpp | 6 +- .../expression_evaluator_utils.cpp | 2 +- .../expression_evaluator_visitor.cpp | 2 +- .../function_evaluator.cpp | 4 +- src/expression_evaluator/lambda_evaluator.cpp | 6 +- .../literal_evaluator.cpp | 4 +- src/expression_evaluator/path_evaluator.cpp | 6 +- .../pattern_evaluator.cpp | 2 +- .../reference_evaluator.cpp | 2 +- src/extension/extension.cpp | 14 +- src/extension/loaded_extension.cpp | 2 +- src/function/aggregate/collect.cpp | 12 +- src/function/aggregate/count.cpp | 2 +- src/function/aggregate/count_star.cpp | 4 +- src/function/aggregate/min_max.cpp | 2 +- src/function/aggregate_function.cpp | 2 +- src/function/array/array_functions.cpp | 2 +- src/function/base_lower_upper_operation.cpp | 4 +- src/function/built_in_function_utils.cpp | 8 +- src/function/cast_from_string_functions.cpp | 8 +- .../cast_string_non_nested_functions.cpp | 4 +- src/function/comparison_functions.cpp | 6 +- src/function/gds/asp_destinations.cpp | 14 +- src/function/gds/awsp_paths.cpp | 4 +- src/function/gds/bfs_graph.cpp | 10 +- src/function/gds/gds.cpp | 16 +- src/function/gds/gds_frontier.cpp | 46 +- src/function/gds/gds_task.cpp | 10 +- src/function/gds/gds_utils.cpp | 2 +- src/function/gds/output_writer.cpp | 12 +- src/function/gds/wsp_destinations.cpp | 16 +- .../internal_id_creation_function.cpp | 2 +- src/function/list/list_extract_function.cpp | 2 +- src/function/list/list_filter.cpp | 6 +- src/function/list/list_range_function.cpp | 4 +- src/function/list/list_reduce.cpp | 4 +- src/function/list/list_slice_function.cpp | 2 +- src/function/list/list_sort_function.cpp | 4 +- src/function/list/list_transform.cpp | 2 +- src/function/list/quantifier_functions.cpp | 2 +- src/function/path/length_function.cpp | 4 +- src/function/path/properties_function.cpp | 2 +- src/function/pattern/cost_function.cpp | 4 +- src/function/pattern/id_function.cpp | 2 +- src/function/pattern/label_function.cpp | 8 +- .../pattern/start_end_node_function.cpp | 4 +- src/function/string/concat_ws.cpp | 2 +- .../string/regex_replace_function.cpp | 4 +- src/function/struct/keys_function.cpp | 2 +- .../struct/struct_extract_function.cpp | 2 +- src/function/struct/struct_pack_function.cpp | 4 +- src/function/table/bm_info.cpp | 2 +- src/function/table/cache_column.cpp | 2 +- src/function/table/file_info.cpp | 2 +- src/function/table/project_cypher_graph.cpp | 2 +- src/function/table/projected_graph_info.cpp | 6 +- src/function/table/simple_table_function.cpp | 2 +- src/function/table/stats_info.cpp | 2 +- src/function/table/storage_info.cpp | 6 +- src/function/table/table_info.cpp | 2 +- src/function/union/union_value_function.cpp | 4 +- src/function/utility/coalesce.cpp | 2 +- src/function/utility/constant_or_null.cpp | 4 +- src/function/utility/count_if.cpp | 2 +- src/function/utility/nullif.cpp | 2 +- src/function/vector_arithmetic_functions.cpp | 22 +- src/function/vector_boolean_functions.cpp | 16 +- src/function/vector_cast_functions.cpp | 22 +- src/function/vector_hash_functions.cpp | 24 +- src/function/vector_node_rel_functions.cpp | 2 +- src/function/vector_null_functions.cpp | 2 +- src/graph/graph.cpp | 4 +- src/graph/on_disk_graph.cpp | 10 +- src/graph/parsed_graph_entry.cpp | 2 +- src/include/binder/binder_scope.h | 6 +- src/include/binder/bound_statement_result.h | 2 +- src/include/binder/ddl/bound_create_table.h | 2 +- src/include/binder/expression/expression.h | 6 +- .../binder/expression/lambda_expression.h | 2 +- .../binder/expression/node_expression.h | 2 +- .../binder/expression/node_rel_expression.h | 4 +- .../binder/expression/rel_expression.h | 2 +- .../binder/query/normalized_query_part.h | 4 +- .../catalog/catalog_entry/catalog_entry.h | 4 +- .../catalog_entry/dummy_catalog_entry.h | 4 +- .../catalog_entry/function_catalog_entry.h | 2 +- .../catalog_entry/table_catalog_entry.h | 2 +- src/include/common/assert.h | 16 +- src/include/common/cast.h | 4 +- src/include/common/concurrent_vector.h | 10 +- .../common/copier_config/file_scan_info.h | 2 +- .../common/data_chunk/data_chunk_collection.h | 4 +- src/include/common/data_chunk/sel_vector.h | 14 +- .../common/enums/extend_direction_util.h | 2 +- .../file_system/compressed_file_system.h | 6 +- src/include/common/file_system/file_info.h | 2 +- src/include/common/file_system/file_system.h | 8 +- src/include/common/mask.h | 8 +- src/include/common/mpsc_queue.h | 2 +- src/include/common/null_mask.h | 4 +- src/include/common/serializer/deserializer.h | 2 +- .../common/serializer/in_mem_file_writer.h | 2 +- src/include/common/static_vector.h | 8 +- src/include/common/timer.h | 2 +- src/include/common/type_utils.h | 14 +- src/include/common/types/value/value.h | 92 +- src/include/common/utils.h | 4 +- src/include/common/vector/value_vector.h | 30 +- .../expression_evaluator/lambda_evaluator.h | 2 +- .../expression_evaluator/list_slice_info.h | 2 +- .../expression_evaluator/path_evaluator.h | 2 +- .../expression_evaluator/pattern_evaluator.h | 2 +- src/include/function/aggregate/avg.h | 2 +- src/include/function/aggregate/min_max.h | 2 +- src/include/function/aggregate/sum.h | 2 +- .../array/functions/array_cosine_similarity.h | 2 +- .../array/functions/array_inner_product.h | 2 +- .../array/functions/array_squared_distance.h | 2 +- .../boolean/boolean_function_executor.h | 6 +- .../boolean/vector_boolean_functions.h | 8 +- .../comparison/vector_comparison_functions.h | 6 +- .../function/const_function_executor.h | 4 +- src/include/function/date/date_functions.h | 10 +- src/include/function/gds/bfs_graph.h | 2 +- src/include/function/gds/gds_frontier.h | 2 +- src/include/function/gds/gds_object_manager.h | 20 +- .../function/null/null_function_executor.h | 2 +- .../function/null/vector_null_functions.h | 4 +- .../function/path/path_function_executor.h | 12 +- src/include/function/scalar_function.h | 36 +- .../function/string/functions/pad_function.h | 2 +- .../function/ternary_function_executor.h | 10 +- src/include/function/udf_function.h | 22 +- src/include/graph/graph_entry_set.h | 2 +- src/include/graph/on_disk_graph.h | 2 +- src/include/main/plan_printer.h | 2 +- .../parser/expression/parsed_expression.h | 2 +- .../expression/parsed_parameter_expression.h | 6 +- .../expression/parsed_subquery_expression.h | 6 +- src/include/parser/query/single_query.h | 2 +- src/include/parser/transformer.h | 106 +- .../operator/extend/base_logical_extend.h | 2 +- .../planner/operator/logical_partitioner.h | 4 +- src/include/planner/operator/logical_plan.h | 4 +- .../operator/persistent/logical_delete.h | 2 +- src/include/planner/operator/schema.h | 8 +- .../operator/aggregate/aggregate_hash_table.h | 2 +- .../operator/aggregate/hash_aggregate.h | 2 +- .../operator/hash_join/join_hash_table.h | 2 +- .../operator/intersect/intersect_build.h | 2 +- .../operator/order_by/key_block_merger.h | 4 +- .../operator/order_by/order_by_key_encoder.h | 2 +- src/include/processor/operator/partitioner.h | 8 +- .../persistent/reader/copy_from_error.h | 2 +- .../persistent/reader/csv/base_csv_reader.h | 2 +- .../reader/parquet/callback_column_reader.h | 20 +- .../persistent/reader/parquet/column_reader.h | 6 +- .../reader/parquet/parquet_dbp_decoder.h | 2 +- .../reader/parquet/parquet_reader.h | 4 +- .../reader/parquet/templated_column_reader.h | 2 +- .../persistent/reader/parquet/thrift_tools.h | 4 +- .../writer/parquet/basic_column_writer.h | 6 +- .../persistent/writer/parquet/column_writer.h | 4 +- .../writer/parquet/string_column_writer.h | 4 +- .../processor/operator/scan/scan_node_table.h | 4 +- src/include/processor/operator/semi_masker.h | 2 +- src/include/processor/operator/sink.h | 2 +- src/include/processor/plan_mapper.h | 4 +- .../result/factorized_table_schema.h | 2 +- src/include/processor/result/result_set.h | 2 +- .../storage/buffer_manager/memory_manager.h | 2 +- .../storage/buffer_manager/mm_allocator.h | 14 +- .../storage/buffer_manager/page_state.h | 10 +- src/include/storage/compression/compression.h | 8 +- src/include/storage/compression/sign_extend.h | 2 +- src/include/storage/disk_array.h | 6 +- src/include/storage/disk_array_collection.h | 2 +- src/include/storage/enums/residency_state.h | 2 +- src/include/storage/file_handle.h | 10 +- src/include/storage/index/hash_index.h | 18 +- src/include/storage/index/hash_index_slot.h | 2 +- src/include/storage/index/in_mem_hash_index.h | 8 +- src/include/storage/index/index.h | 14 +- .../storage/local_storage/local_hash_index.h | 14 +- .../storage/local_storage/local_rel_table.h | 6 +- src/include/storage/overflow_file.h | 4 +- src/include/storage/page_range.h | 2 +- .../storage/predicate/null_predicate.h | 2 +- src/include/storage/stats/column_stats.h | 2 +- src/include/storage/stats/table_stats.h | 6 +- .../storage/table/chunked_node_group.h | 12 +- src/include/storage/table/column_chunk.h | 24 +- src/include/storage/table/column_chunk_data.h | 30 +- .../storage/table/csr_chunked_node_group.h | 6 +- src/include/storage/table/csr_node_group.h | 6 +- src/include/storage/table/group_collection.h | 52 +- .../in_mem_chunked_node_group_collection.h | 2 +- .../storage/table/lazy_segment_scanner.h | 2 +- src/include/storage/table/list_chunk_data.h | 2 +- .../storage/table/node_group_collection.h | 8 +- src/include/storage/table/node_table.h | 6 +- src/include/storage/table/rel_table.h | 4 +- src/include/storage/table/string_chunk_data.h | 2 +- src/include/storage/table/struct_chunk_data.h | 10 +- src/include/storage/table/struct_column.h | 2 +- src/include/storage/table/table.h | 4 +- src/include/storage/undo_buffer.h | 2 +- src/include/transaction/transaction.h | 2 +- src/main/client_context.cpp | 8 +- src/main/connection.cpp | 2 +- src/main/plan_printer.cpp | 4 +- src/main/prepared_statement.cpp | 2 +- src/main/prepared_statement_manager.cpp | 2 +- src/main/settings.cpp | 2 +- src/optimizer/acc_hash_join_optimizer.cpp | 12 +- src/optimizer/cardinality_updater.cpp | 6 +- src/optimizer/filter_push_down_optimizer.cpp | 2 +- .../projection_push_down_optimizer.cpp | 10 +- src/optimizer/top_k_optimizer.cpp | 4 +- src/parser/expression/parsed_expression.cpp | 2 +- .../expression/parsed_expression_visitor.cpp | 2 +- src/parser/parsed_statement_visitor.cpp | 6 +- .../transform/transform_attach_database.cpp | 4 +- src/parser/transform/transform_copy.cpp | 36 +- src/parser/transform/transform_ddl.cpp | 200 +- .../transform/transform_detach_database.cpp | 2 +- src/parser/transform/transform_expression.cpp | 86 +- src/parser/transform/transform_extension.cpp | 26 +- .../transform/transform_graph_pattern.cpp | 34 +- src/parser/transform/transform_macro.cpp | 10 +- src/parser/transform/transform_port_db.cpp | 8 +- src/parser/transform/transform_query.cpp | 4 +- .../transform/transform_reading_clause.cpp | 42 +- .../transform/transform_standalone_call.cpp | 2 +- .../transform/transform_transaction.cpp | 4 +- .../transform/transform_updating_clause.cpp | 10 +- .../transform/transform_use_database.cpp | 2 +- src/parser/transformer.cpp | 96 +- .../join_order/cardinality_estimator.cpp | 12 +- src/planner/join_order/cost_model.cpp | 2 +- src/planner/join_order/join_plan_solver.cpp | 14 +- src/planner/join_order/join_tree.cpp | 10 +- .../join_order/join_tree_constructor.cpp | 6 +- .../operator/extend/base_logical_extend.cpp | 2 +- .../factorization/flatten_resolver.cpp | 2 +- .../operator/factorization/sink_util.cpp | 2 +- .../operator/logical_cross_product.cpp | 2 +- src/planner/operator/logical_explain.cpp | 2 +- src/planner/operator/logical_hash_join.cpp | 6 +- .../operator/logical_path_property_probe.cpp | 4 +- .../operator/persistent/logical_delete.cpp | 4 +- .../operator/persistent/logical_set.cpp | 4 +- .../operator/scan/logical_scan_node_table.cpp | 2 +- src/planner/operator/schema.cpp | 8 +- src/planner/plan/append_cross_product.cpp | 2 +- src/planner/plan/append_distinct.cpp | 2 +- src/planner/plan/append_dummy_scan.cpp | 2 +- src/planner/plan/append_extend.cpp | 4 +- src/planner/plan/append_join.cpp | 4 +- src/planner/plan/append_simple.cpp | 4 +- src/planner/plan/plan_copy.cpp | 8 +- src/planner/plan/plan_join_order.cpp | 22 +- src/planner/plan/plan_port_db.cpp | 4 +- src/planner/plan/plan_projection.cpp | 2 +- src/planner/plan/plan_read.cpp | 6 +- src/planner/plan/plan_subquery.cpp | 6 +- src/planner/plan/plan_update.cpp | 2 +- src/planner/planner.cpp | 2 +- src/planner/query_planner.cpp | 4 +- src/planner/subplans_table.cpp | 2 +- .../map/create_factorized_table_scan.cpp | 2 +- src/processor/map/expression_mapper.cpp | 4 +- src/processor/map/map_acc_hash_join.cpp | 2 +- src/processor/map/map_copy_from.cpp | 4 +- src/processor/map/map_delete.cpp | 8 +- src/processor/map/map_expressions_scan.cpp | 8 +- src/processor/map/map_extend.cpp | 6 +- src/processor/map/map_insert.cpp | 8 +- src/processor/map/map_noop.cpp | 2 +- src/processor/map/map_order_by.cpp | 2 +- src/processor/map/map_path_property_probe.cpp | 2 +- src/processor/map/map_recursive_extend.cpp | 4 +- src/processor/map/map_scan_node_table.cpp | 2 +- src/processor/map/map_semi_masker.cpp | 14 +- src/processor/map/map_set.cpp | 6 +- src/processor/map/map_simple.cpp | 8 +- src/processor/map/map_table_function_call.cpp | 2 +- src/processor/map/plan_mapper.cpp | 2 +- .../aggregate/aggregate_hash_table.cpp | 24 +- .../operator/aggregate/base_aggregate.cpp | 6 +- .../operator/aggregate/hash_aggregate.cpp | 8 +- .../operator/aggregate/simple_aggregate.cpp | 10 +- .../aggregate/simple_aggregate_scan.cpp | 8 +- .../operator/arrow_result_collector.cpp | 2 +- .../base_partitioner_shared_state.cpp | 2 +- src/processor/operator/ddl/alter.cpp | 12 +- src/processor/operator/ddl/create_table.cpp | 4 +- src/processor/operator/ddl/drop.cpp | 10 +- .../operator/hash_join/hash_join_build.cpp | 2 +- .../operator/hash_join/hash_join_probe.cpp | 10 +- .../operator/hash_join/join_hash_table.cpp | 8 +- src/processor/operator/index_lookup.cpp | 4 +- .../operator/intersect/intersect.cpp | 8 +- src/processor/operator/limit.cpp | 2 +- .../operator/order_by/key_block_merger.cpp | 6 +- .../order_by/order_by_key_encoder.cpp | 4 +- src/processor/operator/order_by/top_k.cpp | 4 +- src/processor/operator/partitioner.cpp | 10 +- .../operator/path_property_probe.cpp | 6 +- .../persistent/batch_insert_error_handler.cpp | 6 +- .../persistent/copy_rel_batch_insert.cpp | 8 +- .../operator/persistent/delete_executor.cpp | 12 +- .../operator/persistent/index_builder.cpp | 6 +- .../operator/persistent/insert_executor.cpp | 16 +- src/processor/operator/persistent/merge.cpp | 2 +- .../operator/persistent/node_batch_insert.cpp | 14 +- .../persistent/reader/copy_from_error.cpp | 8 +- .../persistent/reader/csv/base_csv_reader.cpp | 22 +- .../operator/persistent/reader/csv/driver.cpp | 4 +- .../reader/csv/parallel_csv_reader.cpp | 2 +- .../reader/csv/serial_csv_reader.cpp | 4 +- .../persistent/reader/file_error_handler.cpp | 8 +- .../persistent/reader/npy/npy_reader.cpp | 4 +- .../reader/parquet/column_reader.cpp | 28 +- .../reader/parquet/list_column_reader.cpp | 2 +- .../reader/parquet/parquet_reader.cpp | 10 +- .../reader/parquet/string_column_reader.cpp | 2 +- .../reader/parquet/struct_column_reader.cpp | 6 +- .../persistent/reader/reader_bind_utils.cpp | 2 +- .../operator/persistent/rel_batch_insert.cpp | 10 +- .../operator/persistent/set_executor.cpp | 8 +- .../writer/parquet/basic_column_writer.cpp | 18 +- .../writer/parquet/column_writer.cpp | 6 +- .../writer/parquet/parquet_rle_bp_encoder.cpp | 6 +- .../writer/parquet/parquet_writer.cpp | 2 +- .../writer/parquet/string_column_writer.cpp | 2 +- src/processor/operator/physical_operator.cpp | 2 +- .../scan/primary_key_scan_node_table.cpp | 4 +- .../operator/scan/scan_node_table.cpp | 4 +- .../operator/scan/scan_rel_table.cpp | 2 +- src/processor/operator/semi_masker.cpp | 8 +- .../operator/simple/install_extension.cpp | 2 +- src/processor/operator/skip.cpp | 2 +- src/processor/operator/transaction.cpp | 4 +- src/processor/operator/unwind.cpp | 2 +- src/processor/result/base_hash_table.cpp | 12 +- src/processor/result/factorized_table.cpp | 46 +- .../result/pattern_creation_info_table.cpp | 4 +- src/processor/result/result_set.cpp | 2 +- src/processor/warning_context.cpp | 2 +- src/storage/buffer_manager/buffer_manager.cpp | 14 +- src/storage/buffer_manager/memory_manager.cpp | 2 +- src/storage/buffer_manager/spiller.cpp | 4 +- src/storage/compression/bitpacking_int128.cpp | 4 +- src/storage/compression/bitpacking_utils.cpp | 4 +- src/storage/compression/compression.cpp | 40 +- src/storage/compression/float_compression.cpp | 8 +- src/storage/disk_array.cpp | 20 +- src/storage/disk_array_collection.cpp | 2 +- src/storage/file_handle.cpp | 6 +- src/storage/free_space_manager.cpp | 20 +- src/storage/index/hash_index.cpp | 46 +- src/storage/index/in_mem_hash_index.cpp | 20 +- src/storage/index/index.cpp | 8 +- .../local_storage/local_node_table.cpp | 18 +- src/storage/local_storage/local_rel_table.cpp | 28 +- src/storage/local_storage/local_storage.cpp | 2 +- src/storage/overflow_file.cpp | 16 +- src/storage/page_manager.cpp | 2 +- src/storage/predicate/column_predicate.cpp | 2 +- src/storage/predicate/constant_predicate.cpp | 2 +- src/storage/shadow_file.cpp | 12 +- src/storage/shadow_utils.cpp | 12 +- src/storage/stats/column_stats.cpp | 2 +- src/storage/stats/table_stats.cpp | 6 +- src/storage/storage_manager.cpp | 22 +- src/storage/table/chunked_node_group.cpp | 88 +- src/storage/table/column.cpp | 38 +- src/storage/table/column_chunk.cpp | 12 +- src/storage/table/column_chunk_data.cpp | 100 +- src/storage/table/column_chunk_metadata.cpp | 4 +- src/storage/table/column_reader_writer.cpp | 18 +- .../table/compression_flush_buffer.cpp | 26 +- src/storage/table/csr_chunked_node_group.cpp | 48 +- src/storage/table/csr_node_group.cpp | 82 +- src/storage/table/dictionary_chunk.cpp | 4 +- src/storage/table/dictionary_column.cpp | 4 +- .../in_mem_chunked_node_group_collection.cpp | 4 +- .../table/in_memory_exception_chunk.cpp | 10 +- src/storage/table/lazy_segment_scanner.cpp | 4 +- src/storage/table/list_chunk_data.cpp | 36 +- src/storage/table/list_column.cpp | 18 +- src/storage/table/node_group.cpp | 66 +- src/storage/table/node_group_collection.cpp | 18 +- src/storage/table/node_table.cpp | 50 +- src/storage/table/rel_table.cpp | 40 +- src/storage/table/rel_table_data.cpp | 16 +- src/storage/table/string_chunk_data.cpp | 20 +- src/storage/table/string_column.cpp | 10 +- src/storage/table/struct_chunk_data.cpp | 18 +- src/storage/table/struct_column.cpp | 6 +- src/storage/table/table.cpp | 4 +- src/storage/table/update_info.cpp | 18 +- src/storage/table/version_info.cpp | 36 +- src/storage/undo_buffer.cpp | 20 +- src/storage/wal/checksum_reader.cpp | 2 +- src/storage/wal/checksum_writer.cpp | 2 +- src/storage/wal/local_wal.cpp | 2 +- src/storage/wal/wal.cpp | 10 +- src/storage/wal/wal_record.cpp | 6 +- src/storage/wal/wal_replayer.cpp | 50 +- src/transaction/transaction.cpp | 16 +- src/transaction/transaction_context.cpp | 4 +- src/transaction/transaction_manager.cpp | 2 +- test/api/udf_test.cpp | 6 +- test/c_api/database_test.cpp | 2 +- test/copy/copy_test.cpp | 2 +- test/graph_test/base_graph_test.cpp | 2 +- test/include/graph_test/private_graph_test.h | 2 +- test/storage/compress_chunk_test.cpp | 4 +- test/storage/compression_test.cpp | 6 +- test/test_runner/test_runner.cpp | 2 +- third_party/antlr4_cypher/cypher_parser.cpp | 3012 ++++++++--------- .../antlr4_cypher/include/cypher_parser.h | 1062 +++--- tools/benchmark/benchmark.cpp | 2 +- tools/benchmark/benchmark_parser.cpp | 12 +- tools/java_api/src/jni/ryu_java.cpp | 14 +- tools/nodejs_api/src_cpp/node_util.cpp | 4 +- .../src_cpp/include/py_object_container.h | 2 +- tools/python_api/src_cpp/numpy/numpy_scan.cpp | 14 +- tools/python_api/src_cpp/numpy/numpy_type.cpp | 4 +- .../src_cpp/pandas/pandas_analyzer.cpp | 2 +- .../python_api/src_cpp/pandas/pandas_bind.cpp | 2 +- .../python_api/src_cpp/pandas/pandas_scan.cpp | 6 +- tools/python_api/src_cpp/py_connection.cpp | 4 +- tools/python_api/src_cpp/py_conversion.cpp | 10 +- .../src_cpp/py_query_result_converter.cpp | 4 +- .../src_cpp/pyarrow/pyarrow_scan.cpp | 2 +- tools/rust_api/include/ryu_rs.h | 2 +- tools/shell/printer/json_printer.cpp | 2 +- 560 files changed, 4871 insertions(+), 4871 deletions(-) diff --git a/extension/algo/src/function/louvain.cpp b/extension/algo/src/function/louvain.cpp index 3a51847a83..3269488fe2 100644 --- a/extension/algo/src/function/louvain.cpp +++ b/extension/algo/src/function/louvain.cpp @@ -495,7 +495,7 @@ void initInMemoryGraph(const table_id_t tableId, const offset_t numNodes, Graph* PhaseState& state) { const auto nbrTables = graph->getRelInfos(tableId); const auto nbrInfo = nbrTables[0]; - KU_ASSERT(nbrInfo.srcTableID == nbrInfo.dstTableID); + RYU_ASSERT(nbrInfo.srcTableID == nbrInfo.dstTableID); // Set randomLookup to false to enable caching during graph materialization. const auto scanState = graph->prepareRelScan(*nbrInfo.relGroupEntry, nbrInfo.relTableID, nbrInfo.dstTableID, {}, false /*randomLookup*/); @@ -578,7 +578,7 @@ static common::offset_t tableFunc(const TableFuncInput& input, TableFuncOutput&) auto mm = MemoryManager::Get(*clientContext); const auto graph = sharedState->graph.get(); auto maxOffsetMap = graph->getMaxOffsetMap(transaction); - KU_ASSERT(graph->getNodeTableIDs().size() == 1); + RYU_ASSERT(graph->getNodeTableIDs().size() == 1); const auto tableID = graph->getNodeTableIDs()[0]; const auto origNumNodes = graph->getMaxOffset(transaction, tableID); diff --git a/extension/algo/src/function/spanning_forest.cpp b/extension/algo/src/function/spanning_forest.cpp index 738752e4af..799cb1eba0 100644 --- a/extension/algo/src/function/spanning_forest.cpp +++ b/extension/algo/src/function/spanning_forest.cpp @@ -234,7 +234,7 @@ offset_t KruskalCompute::findComponent(const offset_t& nodeId) { } void KruskalCompute::mergeComponents(const offset_t& srcCompId, const offset_t& dstCompId) { - KU_ASSERT_UNCONDITIONAL(srcCompId != dstCompId); + RYU_ASSERT_UNCONDITIONAL(srcCompId != dstCompId); // Merge with the larger component, based on the rank. If ranks are equal, use IDs to break // ties. if (rank[srcCompId] == rank[dstCompId]) { @@ -264,7 +264,7 @@ class WriteResultsSF final : public InMemResultParallelCompute { void parallelCompute(const offset_t startOffset, const offset_t endOffset, const std::optional& tableID) override { - KU_ASSERT(tableID.has_value()); + RYU_ASSERT(tableID.has_value()); for (auto i = startOffset; i < endOffset; ++i) { const auto& [srcId, dstId, relId, forestId] = finalResults[i]; relIdVector->setValue(0, relId); @@ -293,12 +293,12 @@ static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput&) { const auto clientContext = input.context->clientContext; auto sharedState = input.sharedState->ptrCast(); auto graph = sharedState->graph.get(); - KU_ASSERT(graph->getNodeTableIDs().size() == 1); + RYU_ASSERT(graph->getNodeTableIDs().size() == 1); const auto tableId = graph->getNodeTableIDs()[0]; auto mm = MemoryManager::Get(*clientContext); const auto nbrTables = graph->getRelInfos(tableId); const auto nbrInfo = nbrTables[0]; - KU_ASSERT(nbrInfo.srcTableID == nbrInfo.dstTableID); + RYU_ASSERT(nbrInfo.srcTableID == nbrInfo.dstTableID); auto spanningForestBindData = input.bindData->constPtrCast(); auto& config = spanningForestBindData->optionalParams->constCast(); @@ -405,7 +405,7 @@ static void getLogicalPlan(Planner* planner, const BoundReadingClause& readingCl for (auto i = 1u; i < 3; ++i) { auto nodeOutput = bindData->output[i]->ptrCast(); - KU_ASSERT(nodeOutput != nullptr); + RYU_ASSERT(nodeOutput != nullptr); planner->getCardinliatyEstimatorUnsafe().init(*nodeOutput); auto scanPlan = planner->getNodePropertyScanPlan(*nodeOutput); if (!scanPlan.isEmpty()) { @@ -415,7 +415,7 @@ static void getLogicalPlan(Planner* planner, const BoundReadingClause& readingCl } } auto relOutput = bindData->output[0]->ptrCast(); - KU_ASSERT(relOutput != nullptr); + RYU_ASSERT(relOutput != nullptr); auto scanPlan = LogicalPlan(); auto boundNode = relOutput->getSrcNode(); auto nbrNode = relOutput->getDstNode(); diff --git a/extension/algo/src/function/strongly_connected_components_kosaraju.cpp b/extension/algo/src/function/strongly_connected_components_kosaraju.cpp index 58c30df1c2..35d9e55463 100644 --- a/extension/algo/src/function/strongly_connected_components_kosaraju.cpp +++ b/extension/algo/src/function/strongly_connected_components_kosaraju.cpp @@ -67,12 +67,12 @@ class KosarajuVisitedOrder { } void push(offset_t offset) { - KU_ASSERT(curData); + RYU_ASSERT(curData); curData[size_++] = offset; } offset_t pop() { - KU_ASSERT(curData && size_ > 0); + RYU_ASSERT(curData && size_ > 0); size_--; return curData[size_]; } @@ -89,12 +89,12 @@ class Kosaraju { public: Kosaraju(Graph* graph, KosarajuVisitedState& visitedState, KosarajuVisitedOrder& visitedOrder) : graph{graph}, visitedState{visitedState}, visitedOrder{visitedOrder} { - KU_ASSERT(graph->getNodeTableIDs().size() == 1); + RYU_ASSERT(graph->getNodeTableIDs().size() == 1); nodeTableID = graph->getNodeTableIDs()[0]; auto nbrInfos = graph->getRelInfos(nodeTableID); - KU_ASSERT(nbrInfos.size() == 1); + RYU_ASSERT(nbrInfos.size() == 1); auto nbrInfo = nbrInfos[0]; - KU_ASSERT(nbrInfo.srcTableID == nbrInfo.dstTableID); + RYU_ASSERT(nbrInfo.srcTableID == nbrInfo.dstTableID); scanState = graph->prepareRelScan(*nbrInfo.relGroupEntry, nbrInfo.relTableID, nbrInfo.dstTableID, {}); } @@ -112,7 +112,7 @@ class Kosaraju { if (visitedState.visited(i)) { // Skip visited nodes continue; } - KU_ASSERT(toProcess.empty()); + RYU_ASSERT(toProcess.empty()); toProcess.push_back(i); forwardDFS(toProcess); // Update fwd progress @@ -125,7 +125,7 @@ class Kosaraju { } auto offset = visitedOrder.pop(); if (!visitedState.componentIDSet(offset)) { - KU_ASSERT(toProcess.empty()); + RYU_ASSERT(toProcess.empty()); toProcess.push_back(offset); backwardsDFS(offset, toProcess); // Update bwd progress @@ -226,7 +226,7 @@ static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput&) { auto sharedState = input.sharedState->ptrCast(); auto mm = MemoryManager::Get(*clientContext); auto graph = sharedState->graph.get(); - KU_ASSERT(graph->getNodeTableIDs().size() == 1); + RYU_ASSERT(graph->getNodeTableIDs().size() == 1); auto tableID = graph->getNodeTableIDs()[0]; auto nodeMask = sharedState->getGraphNodeMaskMap(); if (nodeMask) { diff --git a/extension/algo/src/include/function/component_ids.h b/extension/algo/src/include/function/component_ids.h index dc5d84a88e..f90743af97 100644 --- a/extension/algo/src/include/function/component_ids.h +++ b/extension/algo/src/include/function/component_ids.h @@ -13,11 +13,11 @@ struct OffsetManager { void pinTableID(common::table_id_t tableID) { curOffset = getStartOffset(tableID); } common::offset_t getStartOffset(common::table_id_t tableID) const { - KU_ASSERT(tableIDToStartOffset.contains(tableID)); + RYU_ASSERT(tableIDToStartOffset.contains(tableID)); return tableIDToStartOffset.at(tableID); } common::offset_t getCurrentOffset() const { - KU_ASSERT(curOffset != common::INVALID_OFFSET); + RYU_ASSERT(curOffset != common::INVALID_OFFSET); return curOffset; } @@ -34,12 +34,12 @@ class ComponentIDs { void pinTableID(common::table_id_t tableID) { curData = denseObjects.getData(tableID); } void setComponentID(common::offset_t offset, common::offset_t componentID) { - KU_ASSERT(curData != nullptr); + RYU_ASSERT(curData != nullptr); curData[offset] = componentID; } common::offset_t getComponentID(common::offset_t offset) const { - KU_ASSERT(curData != nullptr); + RYU_ASSERT(curData != nullptr); return curData[offset]; } bool hasValidComponentID(common::offset_t offset) const { diff --git a/extension/azure/src/function/azure_scan.cpp b/extension/azure/src/function/azure_scan.cpp index d2588e1ab0..9ac33bd8bd 100644 --- a/extension/azure/src/function/azure_scan.cpp +++ b/extension/azure/src/function/azure_scan.cpp @@ -26,7 +26,7 @@ static std::unique_ptr bindFunc(main::ClientContext* context, returnColumnNames.push_back(name); } } - KU_ASSERT(returnTypes.size() == returnColumnNames.size()); + RYU_ASSERT(returnTypes.size() == returnColumnNames.size()); returnColumnNames = TableFunction::extractYieldVariables(returnColumnNames, input->yieldVariables); auto columns = input->binder->createVariables(returnColumnNames, returnTypes); diff --git a/extension/delta/src/function/delta_scan.cpp b/extension/delta/src/function/delta_scan.cpp index c758039059..099a0a91db 100644 --- a/extension/delta/src/function/delta_scan.cpp +++ b/extension/delta/src/function/delta_scan.cpp @@ -27,7 +27,7 @@ static std::unique_ptr bindFunc(main::ClientContext* context, returnColumnNames.push_back(name); } } - KU_ASSERT(returnTypes.size() == returnColumnNames.size()); + RYU_ASSERT(returnTypes.size() == returnColumnNames.size()); returnColumnNames = TableFunction::extractYieldVariables(returnColumnNames, input->yieldVariables); auto columns = input->binder->createVariables(returnColumnNames, returnTypes); diff --git a/extension/duckdb/src/catalog/duckdb_table_catalog_entry.cpp b/extension/duckdb/src/catalog/duckdb_table_catalog_entry.cpp index 079b2fb107..15f3bf6e02 100644 --- a/extension/duckdb/src/catalog/duckdb_table_catalog_entry.cpp +++ b/extension/duckdb/src/catalog/duckdb_table_catalog_entry.cpp @@ -22,7 +22,7 @@ std::unique_ptr DuckDBTableCatalogEntry::copy() const { std::unique_ptr DuckDBTableCatalogEntry::getBoundExtraCreateInfo(transaction::Transaction*) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // namespace catalog diff --git a/extension/duckdb/src/connector/connector_factory.cpp b/extension/duckdb/src/connector/connector_factory.cpp index ab1e12712e..f9a000e45b 100644 --- a/extension/duckdb/src/connector/connector_factory.cpp +++ b/extension/duckdb/src/connector/connector_factory.cpp @@ -28,7 +28,7 @@ std::unique_ptr DuckDBConnectorFactory::getDuckDBConnector( case DuckDBConnectionType::S3: return std::make_unique(); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/extension/duckdb/src/connector/duckdb_connector.cpp b/extension/duckdb/src/connector/duckdb_connector.cpp index a9c6b0c95a..5242278655 100644 --- a/extension/duckdb/src/connector/duckdb_connector.cpp +++ b/extension/duckdb/src/connector/duckdb_connector.cpp @@ -5,7 +5,7 @@ namespace duckdb_extension { std::unique_ptr DuckDBConnector::executeQuery( std::string query) const { - KU_ASSERT(instance != nullptr && connection != nullptr); + RYU_ASSERT(instance != nullptr && connection != nullptr); auto result = connection->Query(query); if (result->HasError()) { throw common::Exception{result->GetError()}; diff --git a/extension/duckdb/src/connector/duckdb_result_converter.cpp b/extension/duckdb/src/connector/duckdb_result_converter.cpp index 06c5ab7a09..af2939b0ac 100644 --- a/extension/duckdb/src/connector/duckdb_result_converter.cpp +++ b/extension/duckdb/src/connector/duckdb_result_converter.cpp @@ -72,7 +72,7 @@ void convertDuckDBVectorToVector(duckdb::Vector& duckDBVector, Val } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } ListVector::resizeDataVector(&result, numValuesInDataVec); @@ -123,7 +123,7 @@ void DuckDBResultConverter::convertDuckDBResultToVector(duckdb::DataChunk& duckD if (columnSkips && columnSkips.value()[i]) { continue; } - KU_ASSERT(duckDBResult.data[duckdbResultColIdx].GetVectorType() == + RYU_ASSERT(duckDBResult.data[duckdbResultColIdx].GetVectorType() == duckdb::VectorType::FLAT_VECTOR); conversionFunctions[i](duckDBResult.data[duckdbResultColIdx], result.getValueVectorMutable(i), result.state->getSelVector().getSelSize()); diff --git a/extension/duckdb/src/connector/duckdb_secret_manager.cpp b/extension/duckdb/src/connector/duckdb_secret_manager.cpp index ea4dd1fa71..d809435b76 100644 --- a/extension/duckdb/src/connector/duckdb_secret_manager.cpp +++ b/extension/duckdb/src/connector/duckdb_secret_manager.cpp @@ -17,7 +17,7 @@ static std::string getDuckDBExtensionOptions(httpfs_extension::S3AuthParams ryuO std::string DuckDBSecretManager::getRemoteS3FSSecret(main::ClientContext* context, const httpfs_extension::S3FileSystemConfig& config) { - KU_ASSERT(config.fsName == "S3" || config.fsName == "GCS"); + RYU_ASSERT(config.fsName == "S3" || config.fsName == "GCS"); std::string templateQuery = R"(CREATE SECRET {}_secret ( {} TYPE {} diff --git a/extension/fts/src/catalog/fts_index_catalog_entry.cpp b/extension/fts/src/catalog/fts_index_catalog_entry.cpp index bb9a8baf41..0e9b4914c2 100644 --- a/extension/fts/src/catalog/fts_index_catalog_entry.cpp +++ b/extension/fts/src/catalog/fts_index_catalog_entry.cpp @@ -39,7 +39,7 @@ std::string FTSIndexAuxInfo::getStopWordsName(const common::FileScanInfo& export } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return stopWordsName; } diff --git a/extension/fts/src/function/create_fts_index.cpp b/extension/fts/src/function/create_fts_index.cpp index 71acf66951..176281dfd7 100644 --- a/extension/fts/src/function/create_fts_index.cpp +++ b/extension/fts/src/function/create_fts_index.cpp @@ -129,7 +129,7 @@ static std::string createStopWordsTable(const ClientContext& context, query += stringFormat("COPY `{}` FROM '{}';", info.tableName, info.stopWords); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return query; } diff --git a/extension/fts/src/function/fts_index_utils.cpp b/extension/fts/src/function/fts_index_utils.cpp index ba3d678a29..9c8b0400de 100644 --- a/extension/fts/src/function/fts_index_utils.cpp +++ b/extension/fts/src/function/fts_index_utils.cpp @@ -30,7 +30,7 @@ void FTSIndexUtils::validateIndexExistence(const main::ClientContext& context, } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/extension/fts/src/function/query_fts_index.cpp b/extension/fts/src/function/query_fts_index.cpp index 082131f363..ada6a6949d 100644 --- a/extension/fts/src/function/query_fts_index.cpp +++ b/extension/fts/src/function/query_fts_index.cpp @@ -46,8 +46,8 @@ struct QFTSSharedState : public GDSFuncSharedState { virtual void addDocScore(std::vector vectors, processor::FactorizedTable& localTable, DocScore docScore) { - KU_ASSERT(vectors[0]->dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); - KU_ASSERT(vectors[1]->dataType.getLogicalTypeID() == LogicalTypeID::DOUBLE); + RYU_ASSERT(vectors[0]->dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); + RYU_ASSERT(vectors[1]->dataType.getLogicalTypeID() == LogicalTypeID::DOUBLE); vectors[0]->setValue(0, internalID_t{(common::offset_t)docScore.offset, outputTableID}); vectors[1]->setValue(0, docScore.score); localTable.append(vectors); @@ -137,7 +137,7 @@ struct QFTSEdgeCompute final : EdgeCompute { std::vector edgeCompute(nodeID_t boundNodeID, graph::NbrScanState::Chunk& resultChunk, bool) override { - KU_ASSERT(dfs.contains(boundNodeID.offset)); + RYU_ASSERT(dfs.contains(boundNodeID.offset)); auto df = dfs.at(boundNodeID.offset); std::vector activeNodes; resultChunk.forEach([&](auto neighbors, auto propertyVectors, auto i) { @@ -473,7 +473,7 @@ static std::unique_ptr bindFunc(main::ClientContext* context, auto nodeTable = StorageManager::Get(*context)->getTable(ftsIndexEntry->getTableID())->ptrCast(); auto index = nodeTable->getIndex(indexName); - KU_ASSERT(index.has_value()); + RYU_ASSERT(index.has_value()); auto& ftsIndex = index.value()->cast(); auto& ftsStorageInfo = ftsIndex.getStorageInfo().constCast(); auto bindData = std::make_unique(std::move(columns), std::move(graphEntry), @@ -493,7 +493,7 @@ static void getLogicalPlan(Planner* planner, const BoundReadingClause& readingCl planner->planReadOp(std::move(op), predicates, plan); auto nodeOutput = bindData->output[0]->ptrCast(); - KU_ASSERT(nodeOutput != nullptr); + RYU_ASSERT(nodeOutput != nullptr); planner->getCardinliatyEstimatorUnsafe().init(*nodeOutput); auto scanPlan = planner->getNodePropertyScanPlan(*nodeOutput); if (scanPlan.isEmpty()) { diff --git a/extension/fts/src/function/stem.cpp b/extension/fts/src/function/stem.cpp index 43ef32f349..d198d9643e 100644 --- a/extension/fts/src/function/stem.cpp +++ b/extension/fts/src/function/stem.cpp @@ -99,7 +99,7 @@ void StemStaticStemmer::operation(common::ku_string_t& word, common::ku_string_t common::ku_string_t& result, common::ValueVector& /*leftValueVector*/, common::ValueVector& /*rightValueVector*/, common::ValueVector& resultVector, void* dataPtr) { auto stemBindData = reinterpret_cast(dataPtr); - KU_ASSERT(stemBindData->sbStemmer != nullptr); + RYU_ASSERT(stemBindData->sbStemmer != nullptr); auto stemData = sb_stemmer_stem(stemBindData->sbStemmer, reinterpret_cast(word.getData()), word.len); common::StringVector::addString(&resultVector, result, reinterpret_cast(stemData), diff --git a/extension/fts/src/include/function/query_fts_bind_data.h b/extension/fts/src/include/function/query_fts_bind_data.h index a1706cc45a..915dc42f39 100644 --- a/extension/fts/src/include/function/query_fts_bind_data.h +++ b/extension/fts/src/include/function/query_fts_bind_data.h @@ -46,7 +46,7 @@ struct QueryFTSBindData final : public function::GDSBindData { outputTableID{output[0]->constCast().getTableIDs()[0]}, numDocs{numDocs}, avgDocLen{avgDocLen} { auto& nodeExpr = output[0]->constCast(); - KU_ASSERT(nodeExpr.getNumEntries() == 1); + RYU_ASSERT(nodeExpr.getNumEntries() == 1); outputTableID = nodeExpr.getEntry(0)->getTableID(); this->optionalParams = std::move(optionalParams); } diff --git a/extension/fts/src/index/fts_index.cpp b/extension/fts/src/index/fts_index.cpp index 2cd12d64ea..eb164818cd 100644 --- a/extension/fts/src/index/fts_index.cpp +++ b/extension/fts/src/index/fts_index.cpp @@ -225,7 +225,7 @@ void FTSIndex::finalize(main::ClientContext* context) { } void FTSIndex::checkpoint(main::ClientContext* context, storage::PageAllocator& pageAllocator) { - KU_ASSERT(!context->isInMemory()); + RYU_ASSERT(!context->isInMemory()); auto catalog = catalog::Catalog::Get(*context); internalTableInfo.docTable->checkpoint(context, catalog->getTableCatalogEntry(&DUMMY_CHECKPOINT_TRANSACTION, diff --git a/extension/fts/src/main/fts_extension.cpp b/extension/fts/src/main/fts_extension.cpp index 1ef42b7e2f..5ac0344a44 100644 --- a/extension/fts/src/main/fts_extension.cpp +++ b/extension/fts/src/main/fts_extension.cpp @@ -25,7 +25,7 @@ static void initFTSEntries(main::ClientContext* context, catalog::Catalog& catal auto& nodeTable = storageManager->getTable(indexEntry->getTableID())->cast(); auto optionalIndex = nodeTable.getIndexHolder(indexEntry->getIndexName()); - KU_ASSERT_UNCONDITIONAL( + RYU_ASSERT_UNCONDITIONAL( optionalIndex.has_value() && !optionalIndex.value().get().isLoaded()); auto& unloadedIndex = optionalIndex.value().get(); unloadedIndex.load(context, storageManager); diff --git a/extension/httpfs/src/http_config.cpp b/extension/httpfs/src/http_config.cpp index e3815a7618..53e77baccd 100644 --- a/extension/httpfs/src/http_config.cpp +++ b/extension/httpfs/src/http_config.cpp @@ -7,7 +7,7 @@ namespace ryu { namespace httpfs_extension { HTTPConfig::HTTPConfig(main::ClientContext* context) { - KU_ASSERT(context != nullptr); + RYU_ASSERT(context != nullptr); cacheFile = context->getCurrentSetting(HTTPCacheFileConfig::HTTP_CACHE_FILE_OPTION).getValue(); } diff --git a/extension/httpfs/src/httpfs.cpp b/extension/httpfs/src/httpfs.cpp index cd50ce1d14..2f72f52e2f 100644 --- a/extension/httpfs/src/httpfs.cpp +++ b/extension/httpfs/src/httpfs.cpp @@ -190,7 +190,7 @@ void HTTPFileSystem::readFromFile(common::FileInfo& fileInfo, void* buffer, uint while (numBytesToRead > 0) { auto buffer_read_len = std::min(httpFileInfo.availableBuffer, numBytesToRead); if (buffer_read_len > 0) { - KU_ASSERT(httpFileInfo.bufferStartPos + httpFileInfo.bufferIdx + buffer_read_len <= + RYU_ASSERT(httpFileInfo.bufferStartPos + httpFileInfo.bufferIdx + buffer_read_len <= httpFileInfo.bufferEndPos); memcpy((char*)buffer + bufferOffset, httpFileInfo.readBuffer.get() + httpFileInfo.bufferIdx, buffer_read_len); diff --git a/extension/httpfs/src/s3fs.cpp b/extension/httpfs/src/s3fs.cpp index 022519f410..ffaad63fad 100644 --- a/extension/httpfs/src/s3fs.cpp +++ b/extension/httpfs/src/s3fs.cpp @@ -42,7 +42,7 @@ void S3FileInfo::initialize(main::ClientContext* context) { auto maxNumParts = uploadParams.maxNumPartsPerFile; auto requiredPartSize = uploadParams.maxFileSize / maxNumParts; partSize = std::max(AWS_MINIMUM_PART_SIZE, requiredPartSize); - KU_ASSERT(partSize * maxNumParts >= uploadParams.maxFileSize); + RYU_ASSERT(partSize * maxNumParts >= uploadParams.maxFileSize); multipartUploadID = s3FS->initializeMultiPartUpload(this); } } diff --git a/extension/iceberg/src/function/iceberg_bindfunc.cpp b/extension/iceberg/src/function/iceberg_bindfunc.cpp index a50a739ee5..2b8704443c 100644 --- a/extension/iceberg/src/function/iceberg_bindfunc.cpp +++ b/extension/iceberg/src/function/iceberg_bindfunc.cpp @@ -69,7 +69,7 @@ std::unique_ptr bindFuncHelper(main::ClientContext* context, returnColumnNames.push_back(name); } } - KU_ASSERT(returnTypes.size() == returnColumnNames.size()); + RYU_ASSERT(returnTypes.size() == returnColumnNames.size()); returnColumnNames = TableFunction::extractYieldVariables(returnColumnNames, input->yieldVariables); auto columns = input->binder->createVariables(returnColumnNames, returnTypes); diff --git a/extension/json/src/functions/creation_functions/json_object.cpp b/extension/json/src/functions/creation_functions/json_object.cpp index 4189912e54..685f8288b0 100644 --- a/extension/json/src/functions/creation_functions/json_object.cpp +++ b/extension/json/src/functions/creation_functions/json_object.cpp @@ -13,7 +13,7 @@ using namespace common; static void execFunc(const std::vector>& parameters, const std::vector& parameterSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/) { - KU_ASSERT(parameters.size() % 2 == 0); + RYU_ASSERT(parameters.size() % 2 == 0); result.resetAuxiliaryBuffer(); for (auto i = 0u; i < resultSelVector->getSelSize(); ++i) { auto resultPos = (*resultSelVector)[i]; diff --git a/extension/json/src/functions/creation_functions/to_json.cpp b/extension/json/src/functions/creation_functions/to_json.cpp index 2be6686cc8..ac81d9e22c 100644 --- a/extension/json/src/functions/creation_functions/to_json.cpp +++ b/extension/json/src/functions/creation_functions/to_json.cpp @@ -12,7 +12,7 @@ using namespace common; void ToJsonFunction::execFunc(const std::vector>& parameters, const std::vector& parameterSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/) { - KU_ASSERT(parameters.size() == 1); + RYU_ASSERT(parameters.size() == 1); result.resetAuxiliaryBuffer(); for (auto i = 0u; i < resultSelVector->getSelSize(); ++i) { auto inputPos = (*parameterSelVectors[0])[i]; diff --git a/extension/json/src/functions/extract_functions/json_extract.cpp b/extension/json/src/functions/extract_functions/json_extract.cpp index 3071a0237e..47a51f6adc 100644 --- a/extension/json/src/functions/extract_functions/json_extract.cpp +++ b/extension/json/src/functions/extract_functions/json_extract.cpp @@ -35,7 +35,7 @@ static void jsonExtractSinglePath( auto param2Int = param2.getValue(param2Pos); output = jsonExtractToString(stringToJson(param1Str), param2Int); } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } StringVector::addString(&result, resultPos, output); } @@ -43,7 +43,7 @@ static void jsonExtractSinglePath( } static std::unique_ptr bindJsonExtractSinglePath(ScalarBindFuncInput input) { - KU_ASSERT(input.arguments.size() == 2); + RYU_ASSERT(input.arguments.size() == 2); std::vector types; types.emplace_back(input.definition->parameterTypeIDs[0]); types.emplace_back(input.definition->parameterTypeIDs[1]); @@ -84,7 +84,7 @@ static void jsonExtractMultiPath( } static std::unique_ptr bindJsonExtractMultiPath(ScalarBindFuncInput input) { - KU_ASSERT(input.arguments.size() == 2); + RYU_ASSERT(input.arguments.size() == 2); if (ListType::getChildType(input.arguments[1]->getDataType()).getLogicalTypeID() != LogicalTypeID::STRING) { throw BinderException("List passed to json_extract must contain type STRING"); diff --git a/extension/json/src/functions/scalar_functions/json_array_length.cpp b/extension/json/src/functions/scalar_functions/json_array_length.cpp index c2c4f220a3..a0f5972879 100644 --- a/extension/json/src/functions/scalar_functions/json_array_length.cpp +++ b/extension/json/src/functions/scalar_functions/json_array_length.cpp @@ -11,7 +11,7 @@ using namespace common; static void jsonArrayLength(const std::vector>& parameters, const std::vector& parameterSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/) { - KU_ASSERT(parameters.size() == 1); + RYU_ASSERT(parameters.size() == 1); for (auto i = 0u; i < resultSelVector->getSelSize(); ++i) { auto inputPos = (*parameterSelVectors[0])[i]; auto resultPos = (*resultSelVector)[i]; diff --git a/extension/json/src/functions/scalar_functions/json_contains.cpp b/extension/json/src/functions/scalar_functions/json_contains.cpp index 2f0d6fde23..312895193c 100644 --- a/extension/json/src/functions/scalar_functions/json_contains.cpp +++ b/extension/json/src/functions/scalar_functions/json_contains.cpp @@ -12,7 +12,7 @@ using namespace common; static bool jsonFuzzyEquals(yyjson_val* haystack, yyjson_val* needle); static bool jsonArrayFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { - KU_ASSERT(yyjson_get_tag(haystack) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE) && + RYU_ASSERT(yyjson_get_tag(haystack) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE) && yyjson_get_tag(needle) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE)); size_t needleIdx = 0, needleMax = 0, haystackIdx = 0, haystackMax = 0; @@ -33,7 +33,7 @@ static bool jsonArrayFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { } static bool JSONObjectFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { - KU_ASSERT(yyjson_get_tag(haystack) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE) && + RYU_ASSERT(yyjson_get_tag(haystack) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE) && yyjson_get_tag(needle) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE)); size_t idx = 0, max = 0; @@ -49,8 +49,8 @@ static bool JSONObjectFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { } static bool jsonFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { - KU_ASSERT(haystack != nullptr); - KU_ASSERT(needle != nullptr); + RYU_ASSERT(haystack != nullptr); + RYU_ASSERT(needle != nullptr); // Strict equality if (unsafe_yyjson_equals(haystack, needle)) { @@ -76,7 +76,7 @@ static bool jsonFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { static bool jsonContains(yyjson_val* haystack, yyjson_val* needle); static bool JSONArrayContains(yyjson_val* haystackArray, yyjson_val* needle) { - KU_ASSERT(yyjson_get_tag(haystackArray) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE)); + RYU_ASSERT(yyjson_get_tag(haystackArray) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE)); size_t idx = 0, max = 0; yyjson_val* childHaystack = nullptr; @@ -89,7 +89,7 @@ static bool JSONArrayContains(yyjson_val* haystackArray, yyjson_val* needle) { } static bool jsonObjectContains(yyjson_val* haystackObject, yyjson_val* needle) { - KU_ASSERT(yyjson_get_tag(haystackObject) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE)); + RYU_ASSERT(yyjson_get_tag(haystackObject) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE)); size_t idx = 0, max = 0; yyjson_val *key = nullptr, *childHaystack = nullptr; diff --git a/extension/json/src/functions/scalar_functions/json_keys.cpp b/extension/json/src/functions/scalar_functions/json_keys.cpp index 5f724d88ab..76354f3629 100644 --- a/extension/json/src/functions/scalar_functions/json_keys.cpp +++ b/extension/json/src/functions/scalar_functions/json_keys.cpp @@ -40,7 +40,7 @@ static void execFunc(const std::vector>& pa } static std::unique_ptr bindFunc(ScalarBindFuncInput input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto type = input.arguments[0]->dataType.copy(); if (type.getLogicalTypeID() == LogicalTypeID::ANY) { type = LogicalType::INT64(); diff --git a/extension/json/src/functions/table_functions/json_scan.cpp b/extension/json/src/functions/table_functions/json_scan.cpp index fa56ba6b06..b0a12c24da 100644 --- a/extension/json/src/functions/table_functions/json_scan.cpp +++ b/extension/json/src/functions/table_functions/json_scan.cpp @@ -41,7 +41,7 @@ struct JSONWarningSourceData { JSONWarningSourceData JSONWarningSourceData::constructFrom( const processor::WarningSourceData& warningData) { - KU_ASSERT(warningData.numValues == JsonConstant::JSON_WARNING_DATA_NUM_COLUMNS); + RYU_ASSERT(warningData.numValues == JsonConstant::JSON_WARNING_DATA_NUM_COLUMNS); JSONWarningSourceData ret{}; warningData.dumpTo(ret.blockIdx, ret.offsetInBlock, ret.startByteOffset, ret.endByteOffset); @@ -115,7 +115,7 @@ struct JSONScanSharedState : public TableFuncSharedState { processor::populate_func_t constructPopulateFunc() const { return [this](const processor::CopyFromFileError& error, [[maybe_unused]] idx_t fileIdx) -> processor::PopulatedCopyFromError { - KU_ASSERT(fileIdx == JsonExtension::JSON_SCAN_FILE_IDX); + RYU_ASSERT(fileIdx == JsonExtension::JSON_SCAN_FILE_IDX); const auto warningData = JSONWarningSourceData::constructFrom(error.warningData); const auto lineNumber = sharedErrorHandler.getLineNumber(warningData.blockIdx, warningData.offsetInBlock); @@ -347,7 +347,7 @@ idx_t JSONScanLocalState::getNewlineCount(uint64_t startByteOffset, uint64_t end processor::WarningSourceData JSONScanLocalState::getWarningData(uint64_t startByteOffset, uint64_t endByteOffset, uint64_t extraLineCount) const { - KU_ASSERT(currentBufferHandle); + RYU_ASSERT(currentBufferHandle); return processor::WarningSourceData::constructFrom(currentBufferHandle->bufferIdx, lineCountInBuffer + extraLineCount, startByteOffset, endByteOffset); } @@ -414,8 +414,8 @@ std::optional JSONScanLocalState::parseJson(uint8_t* jsonStart, uint64 void JSONScanLocalState::addValuesToWarningDataVectors(processor::WarningSourceData warningData, uint64_t recordNumber, const std::optional>& warningDataVectors) { - KU_ASSERT(warningDataVectors); - KU_ASSERT(warningDataVectors->size() == warningData.numValues); + RYU_ASSERT(warningDataVectors); + RYU_ASSERT(warningDataVectors->size() == warningData.numValues); for (column_id_t i = 0; i < warningData.numValues; ++i) { auto* vectorToSet = (*warningDataVectors)[i]; std::visit( @@ -439,7 +439,7 @@ bool JSONScanLocalState::parseNextChunk( if (remaining == 0) { break; } - KU_ASSERT(format != JsonScanFormat::AUTO_DETECT); + RYU_ASSERT(format != JsonScanFormat::AUTO_DETECT); idx_t lineCountInJson = 0; auto jsonEnd = format == JsonScanFormat::NEWLINE_DELIMITED ? nextNewLine(jsonStart, remaining) : @@ -526,7 +526,7 @@ static JsonScanFormat autoDetectFormat(uint8_t* buffer_ptr, uint64_t buffer_size auto doc = yyjson_read_opts(reinterpret_cast(buffer_ptr + buffer_offset), remaining, JSONCommon::READ_STOP_FLAG, alc, &error); if (error.code == YYJSON_READ_SUCCESS) { - KU_ASSERT(yyjson_is_arr(doc->root)); + RYU_ASSERT(yyjson_is_arr(doc->root)); buffer_offset += yyjson_doc_get_read_size(doc); yyjson_doc_free(doc); skipWhitespace(buffer_ptr, buffer_offset, buffer_size); @@ -588,7 +588,7 @@ bool JSONScanLocalState::readNextBuffer() { currentBufferHandle = nullptr; isLast = false; } - KU_ASSERT(!currentBufferHandle); + RYU_ASSERT(!currentBufferHandle); errorHandler->finalize(); return false; } @@ -615,8 +615,8 @@ static uint8_t* previousNewLine(uint8_t* ptr, uint64_t size) { } bool JSONScanLocalState::reconstructFirstObject() { - KU_ASSERT(currentBufferHandle->bufferIdx != 0); - KU_ASSERT(currentReader->getFormat() == JsonScanFormat::NEWLINE_DELIMITED); + RYU_ASSERT(currentBufferHandle->bufferIdx != 0); + RYU_ASSERT(currentReader->getFormat() == JsonScanFormat::NEWLINE_DELIMITED); JsonScanBufferHandle* prevBufferHandle = nullptr; while (!prevBufferHandle) { @@ -790,11 +790,11 @@ static JsonScanFormat autoDetect(main::ClientContext* context, const std::string yyjson_val *key = nullptr, *ele = nullptr; for (auto i = 0u; i < next; i++) { auto* doc = localState.docs[i]; - KU_ASSERT(nullptr != doc); + RYU_ASSERT(nullptr != doc); auto objIter = yyjson_obj_iter_with(doc->root); while ((key = yyjson_obj_iter_next(&objIter))) { ele = yyjson_obj_iter_get_val(key); - KU_ASSERT(yyjson_get_type(doc->root) == YYJSON_TYPE_OBJ); + RYU_ASSERT(yyjson_get_type(doc->root) == YYJSON_TYPE_OBJ); auto keyPtr = unsafe_yyjson_get_str(key); auto keyLen = unsafe_yyjson_get_len(key); auto itr = colNameToIdx.find({keyPtr, keyLen}); @@ -878,7 +878,7 @@ static std::unique_ptr bindFunc(main::ClientContext* context, } static decltype(auto) getWarningDataVectors(const DataChunk& chunk, column_id_t numWarningColumns) { - KU_ASSERT(numWarningColumns <= chunk.getNumValueVectors()); + RYU_ASSERT(numWarningColumns <= chunk.getNumValueVectors()); std::vector ret; for (column_id_t i = chunk.getNumValueVectors() - numWarningColumns; @@ -910,7 +910,7 @@ static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput& output) yyjson_doc** docs = localState->docs; yyjson_val *key = nullptr, *ele = nullptr; for (auto i = 0u; i < count; i++) { - KU_ASSERT(nullptr != docs[i]); + RYU_ASSERT(nullptr != docs[i]); auto objIter = yyjson_obj_iter_with(docs[i]->root); while ((key = yyjson_obj_iter_next(&objIter))) { ele = yyjson_obj_iter_get_val(key); diff --git a/extension/json/src/reader/buffered_json_reader.cpp b/extension/json/src/reader/buffered_json_reader.cpp index 2f974ab0a8..ccb293ff7b 100644 --- a/extension/json/src/reader/buffered_json_reader.cpp +++ b/extension/json/src/reader/buffered_json_reader.cpp @@ -10,7 +10,7 @@ using namespace common; bool JsonFileHandle::getPositionAndSize(uint64_t& position, uint64_t& size, uint64_t requestedSize) { - KU_ASSERT(requestedSize != 0); + RYU_ASSERT(requestedSize != 0); if (lastReadRequested) { return false; } @@ -42,7 +42,7 @@ BufferedJsonReader::BufferedJsonReader(main::ClientContext& context, std::string } std::string BufferedJsonReader::reconstructLine(uint64_t startPosition, uint64_t endPosition) { - KU_ASSERT(endPosition >= startPosition); + RYU_ASSERT(endPosition >= startPosition); std::lock_guard lockGuard{lock}; @@ -59,7 +59,7 @@ std::string BufferedJsonReader::reconstructLine(uint64_t startPosition, uint64_t std::unique_ptr BufferedJsonReader::removeBuffer( const JsonScanBufferHandle& handle) { std::lock_guard guard(lock); - KU_ASSERT(bufferMap.contains(handle.bufferIdx)); + RYU_ASSERT(bufferMap.contains(handle.bufferIdx)); auto result = std::move(bufferMap.at(handle.bufferIdx)->buffer); bufferMap.erase(handle.bufferIdx); return result; diff --git a/extension/json/src/utils/json_utils.cpp b/extension/json/src/utils/json_utils.cpp index 983751380d..0807f0901c 100644 --- a/extension/json/src/utils/json_utils.cpp +++ b/extension/json/src/utils/json_utils.cpp @@ -263,7 +263,7 @@ common::LogicalType jsonSchema(yyjson_val* val, int64_t depth, int64_t breadth) case YYJSON_SUBTYPE_REAL: return LogicalType::DOUBLE(); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case YYJSON_TYPE_STR: { auto value = yyjson_get_str(val); @@ -280,7 +280,7 @@ common::LogicalType jsonSchema(yyjson_val* val, int64_t depth, int64_t breadth) return LogicalType::STRING(); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -494,7 +494,7 @@ static void readFromJsonNum(NUM_TYPE val, common::ValueVector& vec, uint64_t pos function::CastToDecimal::operation(val, vec.getValue(pos), vec, vec); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } break; case LogicalTypeID::STRING: { @@ -562,14 +562,14 @@ void readJsonToValueVector(yyjson_val* val, common::ValueVector& vec, uint64_t p readFromJsonNum(yyjson_get_real(val), vec, pos); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } break; case YYJSON_TYPE_STR: readFromJsonStr(yyjson_get_str(val), vec, pos); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/extension/neo4j/src/function/neo4j_migrate.cpp b/extension/neo4j/src/function/neo4j_migrate.cpp index 1b82c3ecdf..4cb5cf793c 100644 --- a/extension/neo4j/src/function/neo4j_migrate.cpp +++ b/extension/neo4j/src/function/neo4j_migrate.cpp @@ -83,7 +83,7 @@ static std::unordered_set getLabelsInNeo4j(httplib::Client& cli, query = "CALL db.relationshipTypes();"; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } auto res = executeNeo4jQuery(cli, query); for (auto row : res) { diff --git a/extension/vector/src/function/create_hnsw_index.cpp b/extension/vector/src/function/create_hnsw_index.cpp index e7e6deb542..0bb5df1d33 100644 --- a/extension/vector/src/function/create_hnsw_index.cpp +++ b/extension/vector/src/function/create_hnsw_index.cpp @@ -113,7 +113,7 @@ static std::unique_ptr getPhysicalPlan(PlanMapper* planMapper, ->getBindData() ->constPtrCast(); auto createHNSWCallOp = TableFunction::getPhysicalPlan(planMapper, logicalOp); - KU_ASSERT(createHNSWCallOp->getOperatorType() == PhysicalOperatorType::TABLE_FUNCTION_CALL); + RYU_ASSERT(createHNSWCallOp->getOperatorType() == PhysicalOperatorType::TABLE_FUNCTION_CALL); auto createFuncCall = createHNSWCallOp->ptrCast(); auto createFuncSharedState = createFuncCall->getSharedState()->ptrCast(); diff --git a/extension/vector/src/function/query_hnsw_index.cpp b/extension/vector/src/function/query_hnsw_index.cpp index 5f78a1d197..264a3810e0 100644 --- a/extension/vector/src/function/query_hnsw_index.cpp +++ b/extension/vector/src/function/query_hnsw_index.cpp @@ -95,12 +95,12 @@ static std::unique_ptr bindFunc(main::ClientContext* context, cypherQuery = stringFormat("MATCH (n:`{}`) WHERE {} RETURN n", nodeInfo.tableName, nodeInfo.predicate); } else { - KU_ASSERT(graphEntry->type == graph::GraphEntryType::CYPHER); + RYU_ASSERT(graphEntry->type == graph::GraphEntryType::CYPHER); cypherQuery = graphEntry->cast().cypherQuery; } try { auto parsedStatements = parser::Parser::parseQuery(cypherQuery); - KU_ASSERT(parsedStatements.size() == 1); + RYU_ASSERT(parsedStatements.size() == 1); auto binder = Binder(context); boundStatement = binder.bind(*parsedStatements[0]); } catch (Exception& e) { @@ -150,9 +150,9 @@ static std::unique_ptr bindFunc(main::ClientContext* context, bindData->nodeTableEntry = nodeTableEntry; auto indexEntry = catalog->getIndex(transaction, nodeTableEntry->getTableID(), indexName); bindData->indexEntry = indexEntry; - KU_ASSERT(indexEntry->getPropertyIDs().size() == 1); + RYU_ASSERT(indexEntry->getPropertyIDs().size() == 1); auto propertyID = indexEntry->getPropertyIDs()[0]; - KU_ASSERT(nodeTableEntry->getProperty(propertyID).getType().getLogicalTypeID() == + RYU_ASSERT(nodeTableEntry->getProperty(propertyID).getType().getLogicalTypeID() == LogicalTypeID::ARRAY); bindData->indexColumnID = nodeTableEntry->getColumnID(propertyID); bindData->queryExpression = input->params[2]; @@ -192,7 +192,7 @@ static std::vector getQueryVector(main::ClientContext* context, std::shared_ptr queryExpression, const LogicalType& indexType, uint64_t dimension) { auto value = evaluateParamExpr(queryExpression, context, LogicalType::ARRAY(indexType.copy(), dimension)); - KU_ASSERT(NestedVal::getChildVal(&value, 0)->getDataType() == indexType); + RYU_ASSERT(NestedVal::getChildVal(&value, 0)->getDataType() == indexType); return convertQueryVector(value); } @@ -211,8 +211,8 @@ struct HNSWQueryVector : GetEmbeddingsScanState { : data(getQueryVector(context, std::move(queryExpression), indexType, dimension)) {} void* getEmbeddingPtr([[maybe_unused]] const EmbeddingHandle& handle) override { - KU_ASSERT(!handle.isNull()); - KU_ASSERT(handle.offsetInData == 0); + RYU_ASSERT(!handle.isNull()); + RYU_ASSERT(handle.offsetInData == 0); return reinterpret_cast(data.data()); } @@ -232,7 +232,7 @@ static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput& output) ->getTable(bindData->nodeTableEntry->getTableID()) ->ptrCast(); auto indexOpt = nodeTable->getIndex(bindData->indexEntry->getIndexName()); - KU_ASSERT(indexOpt.has_value()); + RYU_ASSERT(indexOpt.has_value()); auto& index = indexOpt.value()->cast(); const auto dimension = ArrayType::getNumElements( getIndexColumnType(*bindData->nodeTableEntry, *bindData->indexEntry)); @@ -247,9 +247,9 @@ static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput& output) index.search(transaction::Transaction::Get(*input.context->clientContext), queryVectorHandle, localState->searchState); }, - [&](auto) { KU_UNREACHABLE; }); + [&](auto) { RYU_UNREACHABLE; }); } - KU_ASSERT(localState->result.has_value()); + RYU_ASSERT(localState->result.has_value()); if (localState->numRowsOutput >= localState->result->size()) { return 0; } @@ -320,11 +320,11 @@ static void getLogicalPlan(Planner* planner, const BoundReadingClause& readingCl auto& node = bindData->filterStatement->getSingleColumnExpr()->constCast(); auto filterPlan = planner->planStatement(*bindData->filterStatement); auto root = filterPlan.getLastOperator(); - KU_ASSERT(root->getOperatorType() == LogicalOperatorType::PROJECTION); + RYU_ASSERT(root->getOperatorType() == LogicalOperatorType::PROJECTION); auto projection = root->ptrCast(); - KU_ASSERT(projection->getExpressionsToProject().size() == 1); + RYU_ASSERT(projection->getExpressionsToProject().size() == 1); auto expr = projection->getExpressionsToProject()[0]; - KU_ASSERT(expr->getDataType().getLogicalTypeID() == LogicalTypeID::NODE); + RYU_ASSERT(expr->getDataType().getLogicalTypeID() == LogicalTypeID::NODE); auto nodeID = expr->constCast().getInternalID(); projection->setExpressionsToProject({nodeID}); // Pre-append semi mask before projection @@ -341,7 +341,7 @@ static void getLogicalPlan(Planner* planner, const BoundReadingClause& readingCl op->computeFactorizedSchema(); planner->planReadOp(op, predicates, plan); auto nodeOutput = bindData->outputNode->ptrCast(); - KU_ASSERT(nodeOutput != nullptr); + RYU_ASSERT(nodeOutput != nullptr); planner->getCardinliatyEstimatorUnsafe().init(*nodeOutput); auto scanPlan = planner->getNodePropertyScanPlan(*nodeOutput); if (scanPlan.isEmpty()) { @@ -366,7 +366,7 @@ static std::unique_ptr getPhysicalPlan(PlanMapper* planMapper, sharedState->semiMasks.addMask(bindData->nodeTableEntry->getTableID(), SemiMaskUtil::createMask(bindData->numRows)); planMapper->addOperatorMapping(logicalOp, op.get()); - KU_ASSERT(logicalOp->getNumChildren() == 1); + RYU_ASSERT(logicalOp->getNumChildren() == 1); auto logicalRoot = logicalOp->getChild(0); auto root = planMapper->mapOperator(logicalRoot.get()); op->addChild(std::move(root)); diff --git a/extension/vector/src/include/index/hnsw_graph.h b/extension/vector/src/include/index/hnsw_graph.h index 6614e38568..8e94043f5f 100644 --- a/extension/vector/src/include/index/hnsw_graph.h +++ b/extension/vector/src/include/index/hnsw_graph.h @@ -246,29 +246,29 @@ class InMemHNSWGraph { compressed_offsets_t getNeighbors(common::offset_t nodeOffset) const { const auto numNbrs = getCSRLength(nodeOffset); - KU_ASSERT(numNbrs <= maxDegree); - KU_ASSERT(nodeOffset < numNodes); + RYU_ASSERT(numNbrs <= maxDegree); + RYU_ASSERT(nodeOffset < numNodes); return dstNodes.getNeighbors(nodeOffset, maxDegree, numNbrs); } common::length_t getMaxDegree() const { return maxDegree; } uint16_t getCSRLength(common::offset_t nodeOffset) const { - KU_ASSERT(nodeOffset < numNodes); + RYU_ASSERT(nodeOffset < numNodes); const auto val = csrLengths[nodeOffset].load(); - KU_ASSERT(val <= maxDegree); + RYU_ASSERT(val <= maxDegree); return val; } // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const function. void setCSRLength(common::offset_t nodeOffset, uint16_t length) { - KU_ASSERT(nodeOffset < numNodes); - KU_ASSERT(length <= maxDegree); + RYU_ASSERT(nodeOffset < numNodes); + RYU_ASSERT(length <= maxDegree); csrLengths[nodeOffset].store(length); } // Note: when the incremented csr length hits maxDegree, this function will block until there is // a shrink happening. uint16_t incrementCSRLength(common::offset_t nodeOffset) { - KU_ASSERT(nodeOffset < numNodes); + RYU_ASSERT(nodeOffset < numNodes); while (true) { auto val = csrLengths[nodeOffset].load(); if (val < maxDegree && csrLengths[nodeOffset].compare_exchange_strong(val, val + 1)) { @@ -277,7 +277,7 @@ class InMemHNSWGraph { } } void setDstNode(common::offset_t csrOffset, common::offset_t dstNode) { - KU_ASSERT(csrOffset < numNodes * maxDegree); + RYU_ASSERT(csrOffset < numNodes * maxDegree); dstNodes.setNodeOffset(csrOffset, dstNode); } diff --git a/extension/vector/src/include/index/hnsw_index.h b/extension/vector/src/include/index/hnsw_index.h index 66ce69df9c..6c10cc70b9 100644 --- a/extension/vector/src/include/index/hnsw_index.h +++ b/extension/vector/src/include/index/hnsw_index.h @@ -154,7 +154,7 @@ struct InMemHNSWLayerInfo { uint64_t getDimension() const { return embeddings->getDimension(); } EmbeddingHandle getEmbedding(common::offset_t offsetInGraph, GetEmbeddingsScanState& scanState) const { - KU_ASSERT(offsetInGraph < numNodes); + RYU_ASSERT(offsetInGraph < numNodes); return embeddings->getEmbedding(offsetMap.graphToNodeOffset(offsetInGraph), scanState); } std::vector getEmbeddings(std::span offsetsInGraph, @@ -218,11 +218,11 @@ class InMemHNSWIndex final : public HNSWIndex { std::unique_ptr initInsertState(main::ClientContext*, storage::visible_func) override { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void insert(transaction::Transaction*, const common::ValueVector&, const std::vector&, InsertState&) override { - KU_UNREACHABLE; + RYU_UNREACHABLE; } // Note that the input is only `offset`, as we assume embeddings are already cached in memory. bool insert(common::offset_t offset, CreateInMemHNSWLocalState* localState); diff --git a/extension/vector/src/index/hnsw_config.cpp b/extension/vector/src/index/hnsw_config.cpp index d88a726821..88c1db5ee6 100644 --- a/extension/vector/src/index/hnsw_config.cpp +++ b/extension/vector/src/index/hnsw_config.cpp @@ -190,7 +190,7 @@ MetricType HNSWIndexConfig::getMetricType(const std::string& metricName) { if (lowerMetricName == "dot_product" || lowerMetricName == "dotproduct") { return MetricType::DotProduct; } - KU_UNREACHABLE; + RYU_UNREACHABLE; } DropHNSWConfig::DropHNSWConfig(const function::optional_params_t& optionalParams) { diff --git a/extension/vector/src/index/hnsw_graph.cpp b/extension/vector/src/index/hnsw_graph.cpp index e3a55f853d..f8ca42d18f 100644 --- a/extension/vector/src/index/hnsw_graph.cpp +++ b/extension/vector/src/index/hnsw_graph.cpp @@ -15,7 +15,7 @@ namespace vector_extension { EmbeddingHandle::EmbeddingHandle(common::offset_t offset, GetEmbeddingsScanState* lifetimeManager) : offsetInData(offset), lifetimeManager(lifetimeManager) { if (lifetimeManager) { - KU_ASSERT(!isNull()); + RYU_ASSERT(!isNull()); lifetimeManager->addEmbedding(*this); } } @@ -59,12 +59,12 @@ void* InMemEmbeddingLocalState::getEmbeddingPtr(const EmbeddingHandle& handle) { common::TypeUtils::visit(type, [&](T) { auto [nodeGroupIdx, offsetInGroup] = StorageUtils::getNodeGroupIdxAndOffsetInChunk(handle.offsetInData); - KU_ASSERT(nodeGroupIdx < data->columnChunks.size()); + RYU_ASSERT(nodeGroupIdx < data->columnChunks.size()); const auto& listChunk = data->columnChunks[nodeGroupIdx]->cast(); val = &listChunk.getDataColumnChunk() ->getData()[listChunk.getListStartOffset(offsetInGroup)]; }); - KU_ASSERT(val != nullptr); + RYU_ASSERT(val != nullptr); } return val; } @@ -87,7 +87,7 @@ std::unique_ptr InMemEmbeddings::constructScanState() co static bool isNull(common::offset_t offset, CachedColumn* data) { auto [nodeGroupIdx, offsetInGroup] = StorageUtils::getNodeGroupIdxAndOffsetInChunk(offset); - KU_ASSERT(nodeGroupIdx < data->columnChunks.size()); + RYU_ASSERT(nodeGroupIdx < data->columnChunks.size()); const auto& listChunk = data->columnChunks[nodeGroupIdx]->cast(); return listChunk.isNull(offsetInGroup); } @@ -146,20 +146,20 @@ EmbeddingHandle OnDiskEmbeddings::getEmbedding(common::offset_t offset, nodeTable.initScanState(transaction, scanState); } const auto result = nodeTable.lookup(transaction, scanState); - KU_ASSERT(scanState.outputVectors.size() == 1 && + RYU_ASSERT(scanState.outputVectors.size() == 1 && scanState.outputVectors[0]->state->getSelVector()[0] == 0); if (!result || scanState.outputVectors[0]->isNull(0)) { return EmbeddingHandle::createNullHandle(); } const auto value = scanState.outputVectors[0]->getValue(0); - KU_ASSERT(value.size == info.typeInfo.getNumElements()); + RYU_ASSERT(value.size == info.typeInfo.getNumElements()); return EmbeddingHandle{value.offset, &embeddingScanState}; } std::vector OnDiskEmbeddings::getEmbeddings( std::span offsets, GetEmbeddingsScanState& embeddingScanState) const { auto& scanState = embeddingScanState.cast().getScanState(); - KU_ASSERT(scanState.nodeIDVector->state == scanState.outState); + RYU_ASSERT(scanState.nodeIDVector->state == scanState.outState); // We skip scanning deleted nodes common::sel_t numSelectedValues = 0; @@ -175,14 +175,14 @@ std::vector OnDiskEmbeddings::getEmbeddings( } selVector.setSelSize(numSelectedValues); - KU_ASSERT( + RYU_ASSERT( scanState.outputVectors[0]->dataType.getLogicalTypeID() == common::LogicalTypeID::ARRAY); [[maybe_unused]] const auto lookupSuccess = nodeTable.lookupMultiple(transaction, scanState); - KU_ASSERT(lookupSuccess); + RYU_ASSERT(lookupSuccess); std::vector embeddings; embeddings.reserve(offsets.size()); - KU_ASSERT(selVector.getSelSize() == numSelectedValues); + RYU_ASSERT(selVector.getSelSize() == numSelectedValues); for (common::sel_t i = 0u; i < selVector.getSelSize(); i++) { const auto pos = selVector[i]; while (embeddings.size() < pos) { @@ -193,7 +193,7 @@ std::vector OnDiskEmbeddings::getEmbeddings( embeddings.emplace_back(EmbeddingHandle::createNullHandle()); } else { const auto value = scanState.outputVectors[0]->getValue(pos); - KU_ASSERT(value.size == info.typeInfo.getNumElements()); + RYU_ASSERT(value.size == info.typeInfo.getNumElements()); embeddings.emplace_back(value.offset, &embeddingScanState); } } @@ -217,30 +217,30 @@ OnDiskEmbeddingScanState::OnDiskEmbeddingScanState(const transaction::Transactio } void* OnDiskEmbeddingScanState::getEmbeddingPtr(const EmbeddingHandle& handle) { - KU_ASSERT(!handle.isNull()); + RYU_ASSERT(!handle.isNull()); void* val = nullptr; const auto dataVector = common::ListVector::getDataVector(scanState->outputVectors[0]); common::TypeUtils::visit( dataVector->dataType, [&]( T) { val = reinterpret_cast(dataVector->getData()) + handle.offsetInData; }, - [&](auto) { KU_UNREACHABLE; }); - KU_ASSERT(val != nullptr); + [&](auto) { RYU_UNREACHABLE; }); + RYU_ASSERT(val != nullptr); return val; } void OnDiskEmbeddingScanState::addEmbedding(const EmbeddingHandle& handle) { - KU_ASSERT(!handle.isNull()); - KU_ASSERT(handle.offsetInData % embeddingDim == 0); + RYU_ASSERT(!handle.isNull()); + RYU_ASSERT(handle.offsetInData % embeddingDim == 0); const auto offsetToAdd = handle.offsetInData / embeddingDim; allocatedOffsets.set(offsetToAdd); - KU_ASSERT(usedEmbeddingOffsets.empty() || offsetToAdd > usedEmbeddingOffsets.top()); + RYU_ASSERT(usedEmbeddingOffsets.empty() || offsetToAdd > usedEmbeddingOffsets.top()); usedEmbeddingOffsets.push(offsetToAdd); } void OnDiskEmbeddingScanState::reclaimEmbedding(const EmbeddingHandle& handle) { - KU_ASSERT(!handle.isNull()); - KU_ASSERT(handle.offsetInData % embeddingDim == 0); + RYU_ASSERT(!handle.isNull()); + RYU_ASSERT(handle.offsetInData % embeddingDim == 0); const auto offsetToRemove = handle.offsetInData / embeddingDim; allocatedOffsets.reset(offsetToRemove); @@ -278,7 +278,7 @@ struct TypedCompressedView final : CompressedOffsetsView { } void setNodeOffsetAtomic(common::offset_t idx, common::offset_t nodeOffset) override { - KU_ASSERT(nodeOffset <= invalidOffset); + RYU_ASSERT(nodeOffset <= invalidOffset); dstNodes[idx].store(static_cast(nodeOffset), std::memory_order_relaxed); } @@ -317,7 +317,7 @@ CompressedNodeOffsetBuffer::CompressedNodeOffsetBuffer(MemoryManager* mm, common view = std::make_unique>(buffer->getData(), numEntries); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -365,7 +365,7 @@ common::offset_t NodeToHNSWGraphOffsetMap::nodeToGraphOffset(common::offset_t no const auto it = std::lower_bound(graphToNodeMap.get(), graphToNodeMap.get() + numNodesInGraph, nodeOffset); const common::offset_t pos = it - graphToNodeMap.get(); - KU_ASSERT(!exactMatch || pos >= numNodesInGraph || *it == nodeOffset); + RYU_ASSERT(!exactMatch || pos >= numNodesInGraph || *it == nodeOffset); return pos; } diff --git a/extension/vector/src/index/hnsw_index.cpp b/extension/vector/src/index/hnsw_index.cpp index ffa32f4c15..b5200e5117 100644 --- a/extension/vector/src/index/hnsw_index.cpp +++ b/extension/vector/src/index/hnsw_index.cpp @@ -25,7 +25,7 @@ std::vector InMemHNSWLayerInfo::getEmbeddings( offsets.reserve(offsetsInGraph.size()); for (size_t i = 0; i < offsetsInGraph.size(); ++i) { auto& offsetInGraph = offsetsInGraph[i]; - KU_ASSERT(offsetInGraph < numNodes); + RYU_ASSERT(offsetInGraph < numNodes); offsets.push_back(offsetMap.graphToNodeOffset(offsetInGraph)); } return embeddings->getEmbeddings(offsets, scanState); @@ -75,13 +75,13 @@ common::offset_t InMemHNSWLayer::searchNN(const EmbeddingHandle& queryVector, auto minDist = info.metricFunc(queryVector.getPtr(), currNodeVector.getPtr(), info.getDimension()); - KU_ASSERT(lastMinDist >= 0); - KU_ASSERT(minDist >= 0); + RYU_ASSERT(lastMinDist >= 0); + RYU_ASSERT(minDist >= 0); while (minDist < lastMinDist) { lastMinDist = minDist; auto nbrOffsets = getNodeOffsets(graph->getNeighbors(currentNodeOffset)); auto nbrVectors = info.getEmbeddings(nbrOffsets, scanState); - KU_ASSERT(nbrOffsets.size() == nbrVectors.size()); + RYU_ASSERT(nbrOffsets.size() == nbrVectors.size()); for (common::offset_t i = 0; i < nbrOffsets.size(); ++i) { const auto nbrOffset = nbrOffsets[i]; const auto* nbrVector = nbrVectors[i].getPtr(); @@ -99,7 +99,7 @@ common::offset_t InMemHNSWLayer::searchNN(const EmbeddingHandle& queryVector, void InMemHNSWLayer::insertRel(common::offset_t srcNode, common::offset_t dstNode, GetEmbeddingsScanState& scanState) { const auto currentLen = graph->incrementCSRLength(srcNode); - KU_ASSERT(srcNode < info.numNodes); + RYU_ASSERT(srcNode < info.numNodes); graph->setDstNode(srcNode * info.degreeThresholdToShrink + currentLen, dstNode); if (currentLen == info.degreeThresholdToShrink - 1) { shrinkForNode(info, graph.get(), srcNode, currentLen, scanState); @@ -214,8 +214,8 @@ void InMemHNSWLayer::shrinkForNode(const InMemHNSWLayerInfo& info, InMemHNSWGrap for (auto i = 1u; i < nbrs.size(); i++) { bool keepNbr = true; for (auto j = i + 1; j < nbrs.size(); j++) { - KU_ASSERT(checkEmbeddingValidity(nbrs, i, info, scanState)); - KU_ASSERT(checkEmbeddingValidity(nbrs, j, info, scanState)); + RYU_ASSERT(checkEmbeddingValidity(nbrs, i, info, scanState)); + RYU_ASSERT(checkEmbeddingValidity(nbrs, j, info, scanState)); const auto dist = info.metricFunc(nbrs[i].embedding.getPtr(), nbrs[j].embedding.getPtr(), info.getDimension()); if (info.alpha * dist < nbrs[i].getDist()) { @@ -243,7 +243,7 @@ void InMemHNSWLayer::finalizeNodeGroup(common::node_group_idx_t nodeGroupIdx, const auto startNodeInGraph = selectedNodesMap.nodeToGraphOffset(startNodeOffset, false); const auto endNodeInGraph = selectedNodesMap.nodeToGraphOffset(endNodeOffset, false); for (auto offsetInGraph = startNodeInGraph; offsetInGraph < endNodeInGraph; offsetInGraph++) { - KU_ASSERT(offsetInGraph < selectedNodesMap.getNumNodesInGraph() && + RYU_ASSERT(offsetInGraph < selectedNodesMap.getNumNodesInGraph() && selectedNodesMap.graphToNodeOffset(offsetInGraph) >= startNodeInGraph && selectedNodesMap.graphToNodeOffset(offsetInGraph) < endNodeOffset); const auto numNbrs = graph->getCSRLength(offsetInGraph); @@ -288,7 +288,7 @@ int64_t HNSWIndex::getMaximumSupportedMl() { static common::ArrayTypeInfo getArrayTypeInfo(NodeTable& table, common::column_id_t columnID) { const auto& columnType = table.getColumn(columnID).getDataType(); - KU_ASSERT(columnType.getLogicalTypeID() == common::LogicalTypeID::ARRAY); + RYU_ASSERT(columnType.getLogicalTypeID() == common::LogicalTypeID::ARRAY); const auto typeInfo = columnType.getExtraTypeInfo()->constPtrCast(); return common::ArrayTypeInfo{typeInfo->getChildType().copy(), typeInfo->getNumElements()}; } @@ -458,8 +458,8 @@ OnDiskHNSWIndex::OnDiskHNSWIndex(const main::ClientContext* context, IndexInfo i indexInfo.columnIDs[0])}, mm{MemoryManager::Get(*context)}, nodeTable{StorageManager::Get(*context)->getTable(indexInfo.tableID)->cast()} { - KU_ASSERT(this->indexInfo.columnIDs.size() == 1); - KU_ASSERT(nodeTable.getColumn(this->indexInfo.columnIDs[0]).getDataType().getLogicalTypeID() == + RYU_ASSERT(this->indexInfo.columnIDs.size() == 1); + RYU_ASSERT(nodeTable.getColumn(this->indexInfo.columnIDs[0]).getDataType().getLogicalTypeID() == common::LogicalTypeID::ARRAY); const auto storageManager = StorageManager::Get(*context); const auto& hnswStorageInfo = this->storageInfo->cast(); @@ -560,15 +560,15 @@ class CommitInsertEmbeddingScanState final : public GetEmbeddingsScanState { : valueVector{valueVector} {} void* getEmbeddingPtr(const EmbeddingHandle& handle) override { - KU_ASSERT(!handle.isNull()); + RYU_ASSERT(!handle.isNull()); void* val = nullptr; const auto dataVector = common::ListVector::getDataVector(valueVector); common::TypeUtils::visit( dataVector->dataType, [&]( T) { val = reinterpret_cast(dataVector->getData()) + handle.offsetInData; }, - [&](auto) { KU_UNREACHABLE; }); - KU_ASSERT(val != nullptr); + [&](auto) { RYU_UNREACHABLE; }); + RYU_ASSERT(val != nullptr); return val; } void addEmbedding(const EmbeddingHandle&) override { @@ -585,8 +585,8 @@ class CommitInsertEmbeddingScanState final : public GetEmbeddingsScanState { void OnDiskHNSWIndex::commitInsert(Transaction* transaction, const common::ValueVector& nodeIDVector, const std::vector& dataVectors, InsertState& insertState) { - KU_ASSERT(dataVectors.size() == 1); - KU_ASSERT(nodeIDVector.state->getSelSize() == dataVectors[0]->state->getSelSize()); + RYU_ASSERT(dataVectors.size() == 1); + RYU_ASSERT(nodeIDVector.state->getSelSize() == dataVectors[0]->state->getSelSize()); auto& hnswInsertState = insertState.cast(); auto commitInsertScanState = std::make_unique(dataVectors[0]); for (size_t i = 0; i < nodeIDVector.state->getSelSize(); ++i) { @@ -762,7 +762,7 @@ std::vector OnDiskHNSWIndex::searchKNNInLayer(Transaction* tra blindTwoHopFilteredSearch(queryVector, neighborItr, searchState, candidates, results); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -980,7 +980,7 @@ void OnDiskHNSWIndex::shrinkForNode(Transaction* transaction, common::offset_t o const auto& embeddings = *insertState.searchState.embeddings; auto& embeddingScanState = insertState.searchState.embeddingScanState; const auto vector = embeddings.getEmbedding(offset, embeddingScanState); - KU_ASSERT(!vector.isNull()); + RYU_ASSERT(!vector.isNull()); const auto& searchState = insertState.searchState; const auto& graph = isUpperLayer ? searchState.upperGraph : searchState.lowerGraph; const auto relTableID = isUpperLayer ? storageInfo->cast().upperRelTableID : @@ -1028,8 +1028,8 @@ void OnDiskHNSWIndex::shrinkForNode(Transaction* transaction, common::offset_t o for (auto i = 1u; i < nbrs.size(); i++) { bool keepNbr = true; for (auto j = i + 1; j < nbrs.size(); j++) { - KU_ASSERT(checkEmbeddingValidity(nbrs, i, embeddings, embeddingScanState)); - KU_ASSERT(checkEmbeddingValidity(nbrs, j, embeddings, embeddingScanState)); + RYU_ASSERT(checkEmbeddingValidity(nbrs, i, embeddings, embeddingScanState)); + RYU_ASSERT(checkEmbeddingValidity(nbrs, j, embeddings, embeddingScanState)); const auto dist = metricFunc(nbrs[i].embedding.getPtr(), nbrs[j].embedding.getPtr(), embeddings.getDimension()); if (config.alpha * dist < nbrs[i].getDist()) { diff --git a/extension/vector/src/index/hnsw_index_utils.cpp b/extension/vector/src/index/hnsw_index_utils.cpp index 934906008a..8f72d48e19 100644 --- a/extension/vector/src/index/hnsw_index_utils.cpp +++ b/extension/vector/src/index/hnsw_index_utils.cpp @@ -32,7 +32,7 @@ bool HNSWIndexUtils::validateIndexExistence(const main::ClientContext& context, case common::ConflictAction::ON_CONFLICT_DO_NOTHING: return true; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return false; @@ -47,7 +47,7 @@ bool HNSWIndexUtils::validateIndexExistence(const main::ClientContext& context, case common::ConflictAction::ON_CONFLICT_DO_NOTHING: return false; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return true; @@ -60,7 +60,7 @@ bool HNSWIndexUtils::validateIndexExistence(const main::ClientContext& context, return true; } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -107,7 +107,7 @@ static metric_func_t computeDistanceFuncDispatch(const common::LogicalType& type return computeDistance; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -128,7 +128,7 @@ metric_func_t HNSWIndexUtils::getMetricsFunction(MetricType metric, return computeDistanceFuncDispatch(type); } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/extension/vector/src/index/hnsw_rel_batch_insert.cpp b/extension/vector/src/index/hnsw_rel_batch_insert.cpp index 42ab221c69..544a138595 100644 --- a/extension/vector/src/index/hnsw_rel_batch_insert.cpp +++ b/extension/vector/src/index/hnsw_rel_batch_insert.cpp @@ -42,8 +42,8 @@ struct HNSWRelBatchInsertExecutionState : processor::RelBatchInsertExecutionStat startNodeOffset + common::StorageConfig::NODE_GROUP_SIZE); startNodeInGraph = selectionMap.nodeToGraphOffset(startNodeOffset, false); endNodeInGraph = selectionMap.nodeToGraphOffset(endNodeOffset, false); - KU_ASSERT(startNodeInGraph <= endNodeInGraph); - KU_ASSERT(endNodeInGraph <= selectionMap.numNodesInTable); + RYU_ASSERT(startNodeInGraph <= endNodeInGraph); + RYU_ASSERT(endNodeInGraph <= selectionMap.numNodesInTable); } common::offset_t startNodeOffset; common::offset_t startNodeInGraph; @@ -70,7 +70,7 @@ std::unique_ptr HNSWRelBatchInsert::ini void HNSWRelBatchInsert::populateCSRLengths(processor::RelBatchInsertExecutionState& executionState, storage::InMemChunkedCSRHeader& csrHeader, common::offset_t numNodes, const processor::RelBatchInsertInfo&) { - KU_ASSERT(numNodes == csrHeader.length->getNumValues() && + RYU_ASSERT(numNodes == csrHeader.length->getNumValues() && numNodes == csrHeader.offset->getNumValues()); const auto& hnswExecutionState = executionState.constCast(); const auto& graph = hnswExecutionState.graph; @@ -81,7 +81,7 @@ void HNSWRelBatchInsert::populateCSRLengths(processor::RelBatchInsertExecutionSt for (common::offset_t graphOffset = startNodeInGraph; graphOffset < endNodeInGraph; ++graphOffset) { const auto nodeOffsetInGroup = hnswExecutionState.getBoundNodeOffsetInGroup(graphOffset); - KU_ASSERT(nodeOffsetInGroup < numNodes); + RYU_ASSERT(nodeOffsetInGroup < numNodes); lengthData[nodeOffsetInGroup] = graph.getCSRLength(graphOffset); } } @@ -136,7 +136,7 @@ void HNSWRelBatchInsert::writeToTable(processor::RelBatchInsertExecutionState& e } } - KU_ASSERT(relIDChunk.getNumValues() == neighbourChunk.getNumValues()); + RYU_ASSERT(relIDChunk.getNumValues() == neighbourChunk.getNumValues()); localState.chunkedGroup->setNumRows(neighbourChunk.getNumValues()); } } // namespace vector_extension diff --git a/extension/vector/src/main/vector_extension.cpp b/extension/vector/src/main/vector_extension.cpp index 39e1eff8f7..a32daddb29 100644 --- a/extension/vector/src/main/vector_extension.cpp +++ b/extension/vector/src/main/vector_extension.cpp @@ -20,7 +20,7 @@ static void initHNSWEntries(main::ClientContext* context) { auto& nodeTable = storageManager->getTable(indexEntry->getTableID())->cast(); auto optionalIndex = nodeTable.getIndexHolder(indexEntry->getIndexName()); - KU_ASSERT_UNCONDITIONAL( + RYU_ASSERT_UNCONDITIONAL( optionalIndex.has_value() && !optionalIndex.value().get().isLoaded()); auto& unloadedIndex = optionalIndex.value().get(); unloadedIndex.load(context, storageManager); diff --git a/scripts/antlr4/Cypher.g4 b/scripts/antlr4/Cypher.g4 index 283815cc75..d51092b80b 100644 --- a/scripts/antlr4/Cypher.g4 +++ b/scripts/antlr4/Cypher.g4 @@ -254,217 +254,217 @@ oC_Cypher oC_Statement : oC_Query - | kU_CreateUser - | kU_CreateRole - | kU_CreateNodeTable - | kU_CreateRelTable - | kU_CreateSequence - | kU_CreateType - | kU_Drop - | kU_AlterTable - | kU_CopyFrom - | kU_CopyFromByColumn - | kU_CopyTO - | kU_StandaloneCall - | kU_CreateMacro - | kU_CommentOn - | kU_Transaction - | kU_Extension - | kU_ExportDatabase - | kU_ImportDatabase - | kU_AttachDatabase - | kU_DetachDatabase - | kU_UseDatabase; - -kU_CopyFrom - : COPY SP oC_SchemaName kU_ColumnNames? SP FROM SP kU_ScanSource ( SP? '(' SP? kU_Options SP? ')' )? ; - -kU_ColumnNames + | rU_CreateUser + | rU_CreateRole + | rU_CreateNodeTable + | rU_CreateRelTable + | rU_CreateSequence + | rU_CreateType + | rU_Drop + | rU_AlterTable + | rU_CopyFrom + | rU_CopyFromByColumn + | rU_CopyTO + | rU_StandaloneCall + | rU_CreateMacro + | rU_CommentOn + | rU_Transaction + | rU_Extension + | rU_ExportDatabase + | rU_ImportDatabase + | rU_AttachDatabase + | rU_DetachDatabase + | rU_UseDatabase; + +rU_CopyFrom + : COPY SP oC_SchemaName rU_ColumnNames? SP FROM SP rU_ScanSource ( SP? '(' SP? rU_Options SP? ')' )? ; + +rU_ColumnNames : SP? '(' SP? (oC_SchemaName ( SP? ',' SP? oC_SchemaName )* SP?)? ')'; -kU_ScanSource - : kU_FilePaths +rU_ScanSource + : rU_FilePaths | '(' SP? oC_Query SP? ')' | oC_Parameter | oC_Variable | oC_Variable '.' SP? oC_SchemaName | oC_FunctionInvocation ; -kU_CopyFromByColumn +rU_CopyFromByColumn : COPY SP oC_SchemaName SP FROM SP '(' SP? StringLiteral ( SP? ',' SP? StringLiteral )* ')' SP BY SP COLUMN ; -kU_CopyTO - : COPY SP '(' SP? oC_Query SP? ')' SP TO SP StringLiteral ( SP? '(' SP? kU_Options SP? ')' )? ; +rU_CopyTO + : COPY SP '(' SP? oC_Query SP? ')' SP TO SP StringLiteral ( SP? '(' SP? rU_Options SP? ')' )? ; -kU_ExportDatabase - : EXPORT SP DATABASE SP StringLiteral ( SP? '(' SP? kU_Options SP? ')' )? ; +rU_ExportDatabase + : EXPORT SP DATABASE SP StringLiteral ( SP? '(' SP? rU_Options SP? ')' )? ; -kU_ImportDatabase +rU_ImportDatabase : IMPORT SP DATABASE SP StringLiteral; -kU_AttachDatabase - : ATTACH SP StringLiteral (SP AS SP oC_SchemaName)? SP '(' SP? DBTYPE SP oC_SymbolicName (SP? ',' SP? kU_Options)? SP? ')' ; +rU_AttachDatabase + : ATTACH SP StringLiteral (SP AS SP oC_SchemaName)? SP '(' SP? DBTYPE SP oC_SymbolicName (SP? ',' SP? rU_Options)? SP? ')' ; -kU_Option +rU_Option : oC_SymbolicName (SP? '=' SP? | SP*) oC_Literal | oC_SymbolicName; -kU_Options - : kU_Option ( SP? ',' SP? kU_Option )* ; +rU_Options + : rU_Option ( SP? ',' SP? rU_Option )* ; -kU_DetachDatabase +rU_DetachDatabase : DETACH SP oC_SchemaName; -kU_UseDatabase +rU_UseDatabase : USE SP oC_SchemaName; -kU_StandaloneCall +rU_StandaloneCall : CALL SP oC_SymbolicName SP? '=' SP? oC_Expression | CALL SP oC_FunctionInvocation; -kU_CommentOn +rU_CommentOn : COMMENT SP ON SP TABLE SP oC_SchemaName SP IS SP StringLiteral ; -kU_CreateMacro - : CREATE SP MACRO SP oC_FunctionName SP? '(' SP? kU_PositionalArgs? SP? kU_DefaultArg? ( SP? ',' SP? kU_DefaultArg )* SP? ')' SP AS SP oC_Expression ; +rU_CreateMacro + : CREATE SP MACRO SP oC_FunctionName SP? '(' SP? rU_PositionalArgs? SP? rU_DefaultArg? ( SP? ',' SP? rU_DefaultArg )* SP? ')' SP AS SP oC_Expression ; -kU_PositionalArgs +rU_PositionalArgs : oC_SymbolicName ( SP? ',' SP? oC_SymbolicName )* ; -kU_DefaultArg +rU_DefaultArg : oC_SymbolicName SP? ':' '=' SP? oC_Literal ; -kU_FilePaths +rU_FilePaths : '[' SP? StringLiteral ( SP? ',' SP? StringLiteral )* ']' | StringLiteral | GLOB SP? '(' SP? StringLiteral SP? ')' ; -kU_IfNotExists +rU_IfNotExists : IF SP NOT SP EXISTS ; -kU_CreateNodeTable - : CREATE SP NODE SP TABLE SP (kU_IfNotExists SP)? oC_SchemaName ( SP? '(' SP? kU_PropertyDefinitions SP? ( ',' SP? kU_CreateNodeConstraint )? SP? ')' | SP AS SP oC_Query ) ; +rU_CreateNodeTable + : CREATE SP NODE SP TABLE SP (rU_IfNotExists SP)? oC_SchemaName ( SP? '(' SP? rU_PropertyDefinitions SP? ( ',' SP? rU_CreateNodeConstraint )? SP? ')' | SP AS SP oC_Query ) ; -kU_CreateRelTable - : CREATE SP REL SP TABLE ( SP GROUP )? ( SP kU_IfNotExists )? SP oC_SchemaName +rU_CreateRelTable + : CREATE SP REL SP TABLE ( SP GROUP )? ( SP rU_IfNotExists )? SP oC_SchemaName SP? '(' SP? - kU_FromToConnections SP? ( - ( ',' SP? kU_PropertyDefinitions SP? )? + rU_FromToConnections SP? ( + ( ',' SP? rU_PropertyDefinitions SP? )? ( ',' SP? oC_SymbolicName SP? )? // Constraints ')' | ')' SP AS SP oC_Query ) - ( SP WITH SP? '(' SP? kU_Options SP? ')')? ; + ( SP WITH SP? '(' SP? rU_Options SP? ')')? ; -kU_FromToConnections - : kU_FromToConnection ( SP? ',' SP? kU_FromToConnection )* ; +rU_FromToConnections + : rU_FromToConnection ( SP? ',' SP? rU_FromToConnection )* ; -kU_FromToConnection +rU_FromToConnection : FROM SP oC_SchemaName SP TO SP oC_SchemaName ; -kU_CreateSequence - : CREATE SP SEQUENCE SP (kU_IfNotExists SP)? oC_SchemaName (SP kU_SequenceOptions)* ; +rU_CreateSequence + : CREATE SP SEQUENCE SP (rU_IfNotExists SP)? oC_SchemaName (SP rU_SequenceOptions)* ; -kU_CreateType - : CREATE SP TYPE SP oC_SchemaName SP AS SP kU_DataType SP? ; +rU_CreateType + : CREATE SP TYPE SP oC_SchemaName SP AS SP rU_DataType SP? ; -kU_SequenceOptions - : kU_IncrementBy - | kU_MinValue - | kU_MaxValue - | kU_StartWith - | kU_Cycle; +rU_SequenceOptions + : rU_IncrementBy + | rU_MinValue + | rU_MaxValue + | rU_StartWith + | rU_Cycle; -kU_WithPasswd +rU_WithPasswd : SP WITH SP PASSWORD SP StringLiteral ; -kU_CreateUser - : CREATE SP USER SP (kU_IfNotExists SP)? oC_Variable kU_WithPasswd? ; +rU_CreateUser + : CREATE SP USER SP (rU_IfNotExists SP)? oC_Variable rU_WithPasswd? ; -kU_CreateRole - : CREATE SP ROLE SP (kU_IfNotExists SP)? oC_Variable ; +rU_CreateRole + : CREATE SP ROLE SP (rU_IfNotExists SP)? oC_Variable ; -kU_IncrementBy : INCREMENT SP ( BY SP )? MINUS? oC_IntegerLiteral ; +rU_IncrementBy : INCREMENT SP ( BY SP )? MINUS? oC_IntegerLiteral ; -kU_MinValue : (NO SP MINVALUE) | (MINVALUE SP MINUS? oC_IntegerLiteral) ; +rU_MinValue : (NO SP MINVALUE) | (MINVALUE SP MINUS? oC_IntegerLiteral) ; -kU_MaxValue : (NO SP MAXVALUE) | (MAXVALUE SP MINUS? oC_IntegerLiteral) ; +rU_MaxValue : (NO SP MAXVALUE) | (MAXVALUE SP MINUS? oC_IntegerLiteral) ; -kU_StartWith : START SP ( WITH SP )? MINUS? oC_IntegerLiteral ; +rU_StartWith : START SP ( WITH SP )? MINUS? oC_IntegerLiteral ; -kU_Cycle : (NO SP)? CYCLE ; +rU_Cycle : (NO SP)? CYCLE ; -kU_IfExists +rU_IfExists : IF SP EXISTS ; -kU_Drop - : DROP SP (TABLE | SEQUENCE | MACRO) SP (kU_IfExists SP)? oC_SchemaName ; +rU_Drop + : DROP SP (TABLE | SEQUENCE | MACRO) SP (rU_IfExists SP)? oC_SchemaName ; -kU_AlterTable - : ALTER SP TABLE SP oC_SchemaName SP kU_AlterOptions ; +rU_AlterTable + : ALTER SP TABLE SP oC_SchemaName SP rU_AlterOptions ; -kU_AlterOptions - : kU_AddProperty - | kU_DropProperty - | kU_RenameTable - | kU_RenameProperty - | kU_AddFromToConnection - | kU_DropFromToConnection; +rU_AlterOptions + : rU_AddProperty + | rU_DropProperty + | rU_RenameTable + | rU_RenameProperty + | rU_AddFromToConnection + | rU_DropFromToConnection; -kU_AddProperty - : ADD SP (kU_IfNotExists SP)? oC_PropertyKeyName SP kU_DataType ( SP kU_Default )? ; +rU_AddProperty + : ADD SP (rU_IfNotExists SP)? oC_PropertyKeyName SP rU_DataType ( SP rU_Default )? ; -kU_Default +rU_Default : DEFAULT SP oC_Expression ; -kU_DropProperty - : DROP SP (kU_IfExists SP)? oC_PropertyKeyName ; +rU_DropProperty + : DROP SP (rU_IfExists SP)? oC_PropertyKeyName ; -kU_RenameTable +rU_RenameTable : RENAME SP TO SP oC_SchemaName ; -kU_RenameProperty +rU_RenameProperty : RENAME SP oC_PropertyKeyName SP TO SP oC_PropertyKeyName ; -kU_AddFromToConnection - : ADD SP (kU_IfNotExists SP)? kU_FromToConnection ; +rU_AddFromToConnection + : ADD SP (rU_IfNotExists SP)? rU_FromToConnection ; -kU_DropFromToConnection - : DROP SP (kU_IfExists SP)? kU_FromToConnection ; +rU_DropFromToConnection + : DROP SP (rU_IfExists SP)? rU_FromToConnection ; -kU_ColumnDefinitions: kU_ColumnDefinition ( SP? ',' SP? kU_ColumnDefinition )* ; +rU_ColumnDefinitions: rU_ColumnDefinition ( SP? ',' SP? rU_ColumnDefinition )* ; -kU_ColumnDefinition : oC_PropertyKeyName SP kU_DataType ; +rU_ColumnDefinition : oC_PropertyKeyName SP rU_DataType ; -kU_PropertyDefinitions : kU_PropertyDefinition ( SP? ',' SP? kU_PropertyDefinition )* ; +rU_PropertyDefinitions : rU_PropertyDefinition ( SP? ',' SP? rU_PropertyDefinition )* ; -kU_PropertyDefinition : kU_ColumnDefinition ( SP kU_Default )? ( SP PRIMARY SP KEY)?; +rU_PropertyDefinition : rU_ColumnDefinition ( SP rU_Default )? ( SP PRIMARY SP KEY)?; -kU_CreateNodeConstraint : PRIMARY SP KEY SP? '(' SP? oC_PropertyKeyName SP? ')' ; +rU_CreateNodeConstraint : PRIMARY SP KEY SP? '(' SP? oC_PropertyKeyName SP? ')' ; DECIMAL: ( 'D' | 'd' ) ( 'E' | 'e' ) ( 'C' | 'c' ) ( 'I' | 'i' ) ( 'M' | 'm' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ; -kU_UnionType - : UNION SP? '(' SP? kU_ColumnDefinitions SP? ')' ; +rU_UnionType + : UNION SP? '(' SP? rU_ColumnDefinitions SP? ')' ; -kU_StructType - : STRUCT SP? '(' SP? kU_ColumnDefinitions SP? ')' ; +rU_StructType + : STRUCT SP? '(' SP? rU_ColumnDefinitions SP? ')' ; -kU_MapType - : MAP SP? '(' SP? kU_DataType SP? ',' SP? kU_DataType SP? ')' ; +rU_MapType + : MAP SP? '(' SP? rU_DataType SP? ',' SP? rU_DataType SP? ')' ; -kU_DecimalType +rU_DecimalType : DECIMAL SP? '(' SP? oC_IntegerLiteral SP? ',' SP? oC_IntegerLiteral SP? ')' ; -kU_DataType +rU_DataType : oC_SymbolicName - | kU_DataType kU_ListIdentifiers - | kU_UnionType - | kU_StructType - | kU_MapType - | kU_DecimalType ; + | rU_DataType rU_ListIdentifiers + | rU_UnionType + | rU_StructType + | rU_MapType + | rU_DecimalType ; -kU_ListIdentifiers : kU_ListIdentifier ( kU_ListIdentifier )* ; +rU_ListIdentifiers : rU_ListIdentifier ( rU_ListIdentifier )* ; -kU_ListIdentifier : '[' oC_IntegerLiteral? ']' ; +rU_ListIdentifier : '[' oC_IntegerLiteral? ']' ; oC_AnyCypherOption : oC_Explain @@ -476,29 +476,29 @@ oC_Explain oC_Profile : PROFILE ; -kU_Transaction +rU_Transaction : BEGIN SP TRANSACTION | BEGIN SP TRANSACTION SP READ SP ONLY | COMMIT | ROLLBACK | CHECKPOINT; -kU_Extension - : kU_LoadExtension - | kU_InstallExtension - | kU_UninstallExtension - | kU_UpdateExtension ; +rU_Extension + : rU_LoadExtension + | rU_InstallExtension + | rU_UninstallExtension + | rU_UpdateExtension ; -kU_LoadExtension +rU_LoadExtension : LOAD SP (EXTENSION SP)? ( StringLiteral | oC_Variable ) ; -kU_InstallExtension +rU_InstallExtension : (FORCE SP)? INSTALL SP oC_Variable (SP FROM SP StringLiteral)?; -kU_UninstallExtension +rU_UninstallExtension : UNINSTALL SP oC_Variable; -kU_UpdateExtension +rU_UpdateExtension : UPDATE SP oC_Variable; oC_Query @@ -524,9 +524,9 @@ oC_SinglePartQuery ; oC_MultiPartQuery - : ( kU_QueryPart SP? )+ oC_SinglePartQuery; + : ( rU_QueryPart SP? )+ oC_SinglePartQuery; -kU_QueryPart +rU_QueryPart : (oC_ReadingClause SP? )* ( oC_UpdatingClause SP? )* oC_With ; oC_UpdatingClause @@ -539,12 +539,12 @@ oC_UpdatingClause oC_ReadingClause : oC_Match | oC_Unwind - | kU_InQueryCall - | kU_LoadFrom + | rU_InQueryCall + | rU_LoadFrom ; -kU_LoadFrom - : LOAD ( SP WITH SP HEADERS SP? '(' SP? kU_ColumnDefinitions SP? ')' )? SP FROM SP kU_ScanSource (SP? '(' SP? kU_Options SP? ')')? (SP? oC_Where)? ; +rU_LoadFrom + : LOAD ( SP WITH SP HEADERS SP? '(' SP? rU_ColumnDefinitions SP? ')' )? SP FROM SP rU_ScanSource (SP? '(' SP? rU_Options SP? ')')? (SP? oC_Where)? ; oC_YieldItem @@ -553,19 +553,19 @@ oC_YieldItem oC_YieldItems : oC_YieldItem ( SP? ',' SP? oC_YieldItem )* ; -kU_InQueryCall +rU_InQueryCall : CALL SP oC_FunctionInvocation (SP? oC_Where)? ( SP? YIELD SP oC_YieldItems )? ; oC_Match - : ( OPTIONAL SP )? MATCH SP? oC_Pattern ( SP oC_Where )? ( SP kU_Hint )? ; + : ( OPTIONAL SP )? MATCH SP? oC_Pattern ( SP oC_Where )? ( SP rU_Hint )? ; -kU_Hint - : HINT SP kU_JoinNode; +rU_Hint + : HINT SP rU_JoinNode; -kU_JoinNode - : kU_JoinNode SP JOIN SP kU_JoinNode - | kU_JoinNode ( SP MULTI_JOIN SP oC_SchemaName)+ - | '(' SP? kU_JoinNode SP? ')' +rU_JoinNode + : rU_JoinNode SP JOIN SP rU_JoinNode + | rU_JoinNode ( SP MULTI_JOIN SP oC_SchemaName)+ + | '(' SP? rU_JoinNode SP? ')' | oC_SchemaName ; oC_Unwind : UNWIND SP? oC_Expression SP AS SP oC_Variable ; @@ -584,7 +584,7 @@ oC_MergeAction oC_Set : SET SP? oC_SetItem ( SP? ',' SP? oC_SetItem )* - | SET SP? oC_Atom SP? '=' SP? kU_Properties; + | SET SP? oC_Atom SP? '=' SP? rU_Properties; oC_SetItem : ( oC_PropertyExpression SP? '=' SP? oC_Expression ) ; @@ -646,7 +646,7 @@ oC_PatternElement ; oC_NodePattern - : '(' SP? ( oC_Variable SP? )? ( oC_NodeLabels SP? )? ( kU_Properties SP? )? ')' ; + : '(' SP? ( oC_Variable SP? )? ( oC_NodeLabels SP? )? ( rU_Properties SP? )? ')' ; oC_PatternElementChain : oC_RelationshipPattern SP? oC_NodePattern ; @@ -658,12 +658,12 @@ oC_RelationshipPattern ; oC_RelationshipDetail - : '[' SP? ( oC_Variable SP? )? ( oC_RelationshipTypes SP? )? ( kU_RecursiveDetail SP? )? ( kU_Properties SP? )? ']' ; + : '[' SP? ( oC_Variable SP? )? ( oC_RelationshipTypes SP? )? ( rU_RecursiveDetail SP? )? ( rU_Properties SP? )? ']' ; // The original oC_Properties definition is oC_MapLiteral | oC_Parameter. // We choose to not support parameter as properties which will be the decision for a long time. // We then substitute with oC_MapLiteral definition. We create oC_MapLiteral only when we decide to add MAP type. -kU_Properties +rU_Properties : '{' SP? ( oC_PropertyKeyName SP? ':' SP? oC_Expression SP? ( ',' SP? oC_PropertyKeyName SP? ':' SP? oC_Expression SP? )* )? '}'; oC_RelationshipTypes @@ -672,10 +672,10 @@ oC_RelationshipTypes oC_NodeLabels : ':' SP? oC_LabelName ( SP? ('|' ':'? | ':') SP? oC_LabelName )* ; -kU_RecursiveDetail - : '*' ( SP? kU_RecursiveType)? ( SP? oC_RangeLiteral )? ( SP? kU_RecursiveComprehension )? ; +rU_RecursiveDetail + : '*' ( SP? rU_RecursiveType)? ( SP? oC_RangeLiteral )? ( SP? rU_RecursiveComprehension )? ; -kU_RecursiveType +rU_RecursiveType : (ALL SP)? WSHORTEST SP? '(' SP? oC_PropertyKeyName SP? ')' | SHORTEST | ALL SP SHORTEST @@ -686,10 +686,10 @@ oC_RangeLiteral : oC_LowerBound? SP? DOTDOT SP? oC_UpperBound? | oC_IntegerLiteral ; -kU_RecursiveComprehension - : '(' SP? oC_Variable SP? ',' SP? oC_Variable ( SP? '|' SP? oC_Where SP? )? ( SP? '|' SP? kU_RecursiveProjectionItems SP? ',' SP? kU_RecursiveProjectionItems SP? )? ')' ; +rU_RecursiveComprehension + : '(' SP? oC_Variable SP? ',' SP? oC_Variable ( SP? '|' SP? oC_Where SP? )? ( SP? '|' SP? rU_RecursiveProjectionItems SP? ',' SP? rU_RecursiveProjectionItems SP? )? ')' ; -kU_RecursiveProjectionItems +rU_RecursiveProjectionItems : '{' SP? oC_ProjectionItems? SP? '}' ; oC_LowerBound @@ -720,35 +720,35 @@ oC_NotExpression : ( NOT SP? )* oC_ComparisonExpression; oC_ComparisonExpression - : kU_BitwiseOrOperatorExpression ( SP? kU_ComparisonOperator SP? kU_BitwiseOrOperatorExpression )? - | kU_BitwiseOrOperatorExpression ( SP? INVALID_NOT_EQUAL SP? kU_BitwiseOrOperatorExpression ) { notifyInvalidNotEqualOperator($INVALID_NOT_EQUAL); } - | kU_BitwiseOrOperatorExpression SP? kU_ComparisonOperator SP? kU_BitwiseOrOperatorExpression ( SP? kU_ComparisonOperator SP? kU_BitwiseOrOperatorExpression )+ { notifyNonBinaryComparison($ctx->start); } + : rU_BitwiseOrOperatorExpression ( SP? rU_ComparisonOperator SP? rU_BitwiseOrOperatorExpression )? + | rU_BitwiseOrOperatorExpression ( SP? INVALID_NOT_EQUAL SP? rU_BitwiseOrOperatorExpression ) { notifyInvalidNotEqualOperator($INVALID_NOT_EQUAL); } + | rU_BitwiseOrOperatorExpression SP? rU_ComparisonOperator SP? rU_BitwiseOrOperatorExpression ( SP? rU_ComparisonOperator SP? rU_BitwiseOrOperatorExpression )+ { notifyNonBinaryComparison($ctx->start); } ; -kU_ComparisonOperator : '=' | '<>' | '<' | '<=' | '>' | '>=' ; +rU_ComparisonOperator : '=' | '<>' | '<' | '<=' | '>' | '>=' ; INVALID_NOT_EQUAL : '!=' ; -kU_BitwiseOrOperatorExpression - : kU_BitwiseAndOperatorExpression ( SP? '|' SP? kU_BitwiseAndOperatorExpression )* ; +rU_BitwiseOrOperatorExpression + : rU_BitwiseAndOperatorExpression ( SP? '|' SP? rU_BitwiseAndOperatorExpression )* ; -kU_BitwiseAndOperatorExpression - : kU_BitShiftOperatorExpression ( SP? '&' SP? kU_BitShiftOperatorExpression )* ; +rU_BitwiseAndOperatorExpression + : rU_BitShiftOperatorExpression ( SP? '&' SP? rU_BitShiftOperatorExpression )* ; -kU_BitShiftOperatorExpression - : oC_AddOrSubtractExpression ( SP? kU_BitShiftOperator SP? oC_AddOrSubtractExpression )* ; +rU_BitShiftOperatorExpression + : oC_AddOrSubtractExpression ( SP? rU_BitShiftOperator SP? oC_AddOrSubtractExpression )* ; -kU_BitShiftOperator : '>>' | '<<' ; +rU_BitShiftOperator : '>>' | '<<' ; oC_AddOrSubtractExpression - : oC_MultiplyDivideModuloExpression ( SP? kU_AddOrSubtractOperator SP? oC_MultiplyDivideModuloExpression )* ; + : oC_MultiplyDivideModuloExpression ( SP? rU_AddOrSubtractOperator SP? oC_MultiplyDivideModuloExpression )* ; -kU_AddOrSubtractOperator : '+' | '-' ; +rU_AddOrSubtractOperator : '+' | '-' ; oC_MultiplyDivideModuloExpression - : oC_PowerOfExpression ( SP? kU_MultiplyDivideModuloOperator SP? oC_PowerOfExpression )* ; + : oC_PowerOfExpression ( SP? rU_MultiplyDivideModuloOperator SP? oC_PowerOfExpression )* ; -kU_MultiplyDivideModuloOperator : '*' | '/' | '%' ; +rU_MultiplyDivideModuloOperator : '*' | '/' | '%' ; oC_PowerOfExpression : oC_StringListNullOperatorExpression ( SP? '^' SP? oC_StringListNullOperatorExpression )* ; @@ -816,7 +816,7 @@ oC_Literal | oC_BooleanLiteral | NULL | oC_ListLiteral - | kU_StructLiteral + | rU_StructLiteral ; oC_BooleanLiteral @@ -825,15 +825,15 @@ oC_BooleanLiteral ; oC_ListLiteral - : '[' SP? ( oC_Expression SP? ( kU_ListEntry SP? )* )? ']' ; + : '[' SP? ( oC_Expression SP? ( rU_ListEntry SP? )* )? ']' ; -kU_ListEntry +rU_ListEntry : ',' SP? oC_Expression? ; -kU_StructLiteral - : '{' SP? kU_StructField SP? ( ',' SP? kU_StructField SP? )* '}' ; +rU_StructLiteral + : '{' SP? rU_StructField SP? ( ',' SP? rU_StructField SP? )* '}' ; -kU_StructField +rU_StructField : ( oC_SymbolicName | StringLiteral ) SP? ':' SP? oC_Expression ; oC_ParenthesizedExpression @@ -841,20 +841,20 @@ oC_ParenthesizedExpression oC_FunctionInvocation : COUNT SP? '(' SP? '*' SP? ')' - | CAST SP? '(' SP? kU_FunctionParameter SP? ( ( AS SP? kU_DataType ) | ( ',' SP? kU_FunctionParameter ) ) SP? ')' - | oC_FunctionName SP? '(' SP? ( DISTINCT SP? )? ( kU_FunctionParameter SP? ( ',' SP? kU_FunctionParameter SP? )* )? ')' ; + | CAST SP? '(' SP? rU_FunctionParameter SP? ( ( AS SP? rU_DataType ) | ( ',' SP? rU_FunctionParameter ) ) SP? ')' + | oC_FunctionName SP? '(' SP? ( DISTINCT SP? )? ( rU_FunctionParameter SP? ( ',' SP? rU_FunctionParameter SP? )* )? ')' ; oC_FunctionName : oC_SymbolicName ; -kU_FunctionParameter +rU_FunctionParameter : ( oC_SymbolicName SP? ':' '=' SP? )? oC_Expression - | kU_LambdaParameter ; + | rU_LambdaParameter ; -kU_LambdaParameter - : kU_LambdaVars SP? '-' '>' SP? oC_Expression SP? ; +rU_LambdaParameter + : rU_LambdaVars SP? '-' '>' SP? oC_Expression SP? ; -kU_LambdaVars +rU_LambdaVars : oC_SymbolicName | '(' SP? oC_SymbolicName SP? ( ',' SP? oC_SymbolicName SP?)* ')' ; @@ -862,7 +862,7 @@ oC_PathPatterns : oC_NodePattern ( SP? oC_PatternElementChain )+; oC_ExistCountSubquery - : (EXISTS | COUNT) SP? '{' SP? MATCH SP? oC_Pattern ( SP? oC_Where )? ( SP? kU_Hint )? SP? '}' ; + : (EXISTS | COUNT) SP? '{' SP? MATCH SP? oC_Pattern ( SP? oC_Where )? ( SP? rU_Hint )? SP? '}' ; oC_PropertyLookup : '.' SP? ( oC_PropertyKeyName | STAR ) ; @@ -962,11 +962,11 @@ oC_SymbolicName : UnescapedSymbolicName | EscapedSymbolicName {if ($EscapedSymbolicName.text == "``") { notifyEmptyToken($EscapedSymbolicName); }} | HexLetter - | kU_NonReservedKeywords + | rU_NonReservedKeywords ; // example of BEGIN and END: TCKWith2.Scenario1 -kU_NonReservedKeywords +rU_NonReservedKeywords : COMMENT | ADD | ALTER diff --git a/scripts/antlr4/hash.md5 b/scripts/antlr4/hash.md5 index f6d1ec11e7..303330cdbc 100644 --- a/scripts/antlr4/hash.md5 +++ b/scripts/antlr4/hash.md5 @@ -1 +1 @@ -8334a684be17e562250acf07ae2bbca0 +fa8e23103447aadd89ef5c80d7a7d701 diff --git a/src/antlr4/Cypher.g4 b/src/antlr4/Cypher.g4 index e409515c72..7cab97a3ae 100644 --- a/src/antlr4/Cypher.g4 +++ b/src/antlr4/Cypher.g4 @@ -7,217 +7,217 @@ oC_Cypher oC_Statement : oC_Query - | kU_CreateUser - | kU_CreateRole - | kU_CreateNodeTable - | kU_CreateRelTable - | kU_CreateSequence - | kU_CreateType - | kU_Drop - | kU_AlterTable - | kU_CopyFrom - | kU_CopyFromByColumn - | kU_CopyTO - | kU_StandaloneCall - | kU_CreateMacro - | kU_CommentOn - | kU_Transaction - | kU_Extension - | kU_ExportDatabase - | kU_ImportDatabase - | kU_AttachDatabase - | kU_DetachDatabase - | kU_UseDatabase; - -kU_CopyFrom - : COPY SP oC_SchemaName kU_ColumnNames? SP FROM SP kU_ScanSource ( SP? '(' SP? kU_Options SP? ')' )? ; - -kU_ColumnNames + | rU_CreateUser + | rU_CreateRole + | rU_CreateNodeTable + | rU_CreateRelTable + | rU_CreateSequence + | rU_CreateType + | rU_Drop + | rU_AlterTable + | rU_CopyFrom + | rU_CopyFromByColumn + | rU_CopyTO + | rU_StandaloneCall + | rU_CreateMacro + | rU_CommentOn + | rU_Transaction + | rU_Extension + | rU_ExportDatabase + | rU_ImportDatabase + | rU_AttachDatabase + | rU_DetachDatabase + | rU_UseDatabase; + +rU_CopyFrom + : COPY SP oC_SchemaName rU_ColumnNames? SP FROM SP rU_ScanSource ( SP? '(' SP? rU_Options SP? ')' )? ; + +rU_ColumnNames : SP? '(' SP? (oC_SchemaName ( SP? ',' SP? oC_SchemaName )* SP?)? ')'; -kU_ScanSource - : kU_FilePaths +rU_ScanSource + : rU_FilePaths | '(' SP? oC_Query SP? ')' | oC_Parameter | oC_Variable | oC_Variable '.' SP? oC_SchemaName | oC_FunctionInvocation ; -kU_CopyFromByColumn +rU_CopyFromByColumn : COPY SP oC_SchemaName SP FROM SP '(' SP? StringLiteral ( SP? ',' SP? StringLiteral )* ')' SP BY SP COLUMN ; -kU_CopyTO - : COPY SP '(' SP? oC_Query SP? ')' SP TO SP StringLiteral ( SP? '(' SP? kU_Options SP? ')' )? ; +rU_CopyTO + : COPY SP '(' SP? oC_Query SP? ')' SP TO SP StringLiteral ( SP? '(' SP? rU_Options SP? ')' )? ; -kU_ExportDatabase - : EXPORT SP DATABASE SP StringLiteral ( SP? '(' SP? kU_Options SP? ')' )? ; +rU_ExportDatabase + : EXPORT SP DATABASE SP StringLiteral ( SP? '(' SP? rU_Options SP? ')' )? ; -kU_ImportDatabase +rU_ImportDatabase : IMPORT SP DATABASE SP StringLiteral; -kU_AttachDatabase - : ATTACH SP StringLiteral (SP AS SP oC_SchemaName)? SP '(' SP? DBTYPE SP oC_SymbolicName (SP? ',' SP? kU_Options)? SP? ')' ; +rU_AttachDatabase + : ATTACH SP StringLiteral (SP AS SP oC_SchemaName)? SP '(' SP? DBTYPE SP oC_SymbolicName (SP? ',' SP? rU_Options)? SP? ')' ; -kU_Option +rU_Option : oC_SymbolicName (SP? '=' SP? | SP*) oC_Literal | oC_SymbolicName; -kU_Options - : kU_Option ( SP? ',' SP? kU_Option )* ; +rU_Options + : rU_Option ( SP? ',' SP? rU_Option )* ; -kU_DetachDatabase +rU_DetachDatabase : DETACH SP oC_SchemaName; -kU_UseDatabase +rU_UseDatabase : USE SP oC_SchemaName; -kU_StandaloneCall +rU_StandaloneCall : CALL SP oC_SymbolicName SP? '=' SP? oC_Expression | CALL SP oC_FunctionInvocation; -kU_CommentOn +rU_CommentOn : COMMENT SP ON SP TABLE SP oC_SchemaName SP IS SP StringLiteral ; -kU_CreateMacro - : CREATE SP MACRO SP oC_FunctionName SP? '(' SP? kU_PositionalArgs? SP? kU_DefaultArg? ( SP? ',' SP? kU_DefaultArg )* SP? ')' SP AS SP oC_Expression ; +rU_CreateMacro + : CREATE SP MACRO SP oC_FunctionName SP? '(' SP? rU_PositionalArgs? SP? rU_DefaultArg? ( SP? ',' SP? rU_DefaultArg )* SP? ')' SP AS SP oC_Expression ; -kU_PositionalArgs +rU_PositionalArgs : oC_SymbolicName ( SP? ',' SP? oC_SymbolicName )* ; -kU_DefaultArg +rU_DefaultArg : oC_SymbolicName SP? ':' '=' SP? oC_Literal ; -kU_FilePaths +rU_FilePaths : '[' SP? StringLiteral ( SP? ',' SP? StringLiteral )* ']' | StringLiteral | GLOB SP? '(' SP? StringLiteral SP? ')' ; -kU_IfNotExists +rU_IfNotExists : IF SP NOT SP EXISTS ; -kU_CreateNodeTable - : CREATE SP NODE SP TABLE SP (kU_IfNotExists SP)? oC_SchemaName ( SP? '(' SP? kU_PropertyDefinitions SP? ( ',' SP? kU_CreateNodeConstraint )? SP? ')' | SP AS SP oC_Query ) ; +rU_CreateNodeTable + : CREATE SP NODE SP TABLE SP (rU_IfNotExists SP)? oC_SchemaName ( SP? '(' SP? rU_PropertyDefinitions SP? ( ',' SP? rU_CreateNodeConstraint )? SP? ')' | SP AS SP oC_Query ) ; -kU_CreateRelTable - : CREATE SP REL SP TABLE ( SP GROUP )? ( SP kU_IfNotExists )? SP oC_SchemaName +rU_CreateRelTable + : CREATE SP REL SP TABLE ( SP GROUP )? ( SP rU_IfNotExists )? SP oC_SchemaName SP? '(' SP? - kU_FromToConnections SP? ( - ( ',' SP? kU_PropertyDefinitions SP? )? + rU_FromToConnections SP? ( + ( ',' SP? rU_PropertyDefinitions SP? )? ( ',' SP? oC_SymbolicName SP? )? // Constraints ')' | ')' SP AS SP oC_Query ) - ( SP WITH SP? '(' SP? kU_Options SP? ')')? ; + ( SP WITH SP? '(' SP? rU_Options SP? ')')? ; -kU_FromToConnections - : kU_FromToConnection ( SP? ',' SP? kU_FromToConnection )* ; +rU_FromToConnections + : rU_FromToConnection ( SP? ',' SP? rU_FromToConnection )* ; -kU_FromToConnection +rU_FromToConnection : FROM SP oC_SchemaName SP TO SP oC_SchemaName ; -kU_CreateSequence - : CREATE SP SEQUENCE SP (kU_IfNotExists SP)? oC_SchemaName (SP kU_SequenceOptions)* ; +rU_CreateSequence + : CREATE SP SEQUENCE SP (rU_IfNotExists SP)? oC_SchemaName (SP rU_SequenceOptions)* ; -kU_CreateType - : CREATE SP TYPE SP oC_SchemaName SP AS SP kU_DataType SP? ; +rU_CreateType + : CREATE SP TYPE SP oC_SchemaName SP AS SP rU_DataType SP? ; -kU_SequenceOptions - : kU_IncrementBy - | kU_MinValue - | kU_MaxValue - | kU_StartWith - | kU_Cycle; +rU_SequenceOptions + : rU_IncrementBy + | rU_MinValue + | rU_MaxValue + | rU_StartWith + | rU_Cycle; -kU_WithPasswd +rU_WithPasswd : SP WITH SP PASSWORD SP StringLiteral ; -kU_CreateUser - : CREATE SP USER SP (kU_IfNotExists SP)? oC_Variable kU_WithPasswd? ; +rU_CreateUser + : CREATE SP USER SP (rU_IfNotExists SP)? oC_Variable rU_WithPasswd? ; -kU_CreateRole - : CREATE SP ROLE SP (kU_IfNotExists SP)? oC_Variable ; +rU_CreateRole + : CREATE SP ROLE SP (rU_IfNotExists SP)? oC_Variable ; -kU_IncrementBy : INCREMENT SP ( BY SP )? MINUS? oC_IntegerLiteral ; +rU_IncrementBy : INCREMENT SP ( BY SP )? MINUS? oC_IntegerLiteral ; -kU_MinValue : (NO SP MINVALUE) | (MINVALUE SP MINUS? oC_IntegerLiteral) ; +rU_MinValue : (NO SP MINVALUE) | (MINVALUE SP MINUS? oC_IntegerLiteral) ; -kU_MaxValue : (NO SP MAXVALUE) | (MAXVALUE SP MINUS? oC_IntegerLiteral) ; +rU_MaxValue : (NO SP MAXVALUE) | (MAXVALUE SP MINUS? oC_IntegerLiteral) ; -kU_StartWith : START SP ( WITH SP )? MINUS? oC_IntegerLiteral ; +rU_StartWith : START SP ( WITH SP )? MINUS? oC_IntegerLiteral ; -kU_Cycle : (NO SP)? CYCLE ; +rU_Cycle : (NO SP)? CYCLE ; -kU_IfExists +rU_IfExists : IF SP EXISTS ; -kU_Drop - : DROP SP (TABLE | SEQUENCE | MACRO) SP (kU_IfExists SP)? oC_SchemaName ; +rU_Drop + : DROP SP (TABLE | SEQUENCE | MACRO) SP (rU_IfExists SP)? oC_SchemaName ; -kU_AlterTable - : ALTER SP TABLE SP oC_SchemaName SP kU_AlterOptions ; +rU_AlterTable + : ALTER SP TABLE SP oC_SchemaName SP rU_AlterOptions ; -kU_AlterOptions - : kU_AddProperty - | kU_DropProperty - | kU_RenameTable - | kU_RenameProperty - | kU_AddFromToConnection - | kU_DropFromToConnection; +rU_AlterOptions + : rU_AddProperty + | rU_DropProperty + | rU_RenameTable + | rU_RenameProperty + | rU_AddFromToConnection + | rU_DropFromToConnection; -kU_AddProperty - : ADD SP (kU_IfNotExists SP)? oC_PropertyKeyName SP kU_DataType ( SP kU_Default )? ; +rU_AddProperty + : ADD SP (rU_IfNotExists SP)? oC_PropertyKeyName SP rU_DataType ( SP rU_Default )? ; -kU_Default +rU_Default : DEFAULT SP oC_Expression ; -kU_DropProperty - : DROP SP (kU_IfExists SP)? oC_PropertyKeyName ; +rU_DropProperty + : DROP SP (rU_IfExists SP)? oC_PropertyKeyName ; -kU_RenameTable +rU_RenameTable : RENAME SP TO SP oC_SchemaName ; -kU_RenameProperty +rU_RenameProperty : RENAME SP oC_PropertyKeyName SP TO SP oC_PropertyKeyName ; -kU_AddFromToConnection - : ADD SP (kU_IfNotExists SP)? kU_FromToConnection ; +rU_AddFromToConnection + : ADD SP (rU_IfNotExists SP)? rU_FromToConnection ; -kU_DropFromToConnection - : DROP SP (kU_IfExists SP)? kU_FromToConnection ; +rU_DropFromToConnection + : DROP SP (rU_IfExists SP)? rU_FromToConnection ; -kU_ColumnDefinitions: kU_ColumnDefinition ( SP? ',' SP? kU_ColumnDefinition )* ; +rU_ColumnDefinitions: rU_ColumnDefinition ( SP? ',' SP? rU_ColumnDefinition )* ; -kU_ColumnDefinition : oC_PropertyKeyName SP kU_DataType ; +rU_ColumnDefinition : oC_PropertyKeyName SP rU_DataType ; -kU_PropertyDefinitions : kU_PropertyDefinition ( SP? ',' SP? kU_PropertyDefinition )* ; +rU_PropertyDefinitions : rU_PropertyDefinition ( SP? ',' SP? rU_PropertyDefinition )* ; -kU_PropertyDefinition : kU_ColumnDefinition ( SP kU_Default )? ( SP PRIMARY SP KEY)?; +rU_PropertyDefinition : rU_ColumnDefinition ( SP rU_Default )? ( SP PRIMARY SP KEY)?; -kU_CreateNodeConstraint : PRIMARY SP KEY SP? '(' SP? oC_PropertyKeyName SP? ')' ; +rU_CreateNodeConstraint : PRIMARY SP KEY SP? '(' SP? oC_PropertyKeyName SP? ')' ; DECIMAL: ( 'D' | 'd' ) ( 'E' | 'e' ) ( 'C' | 'c' ) ( 'I' | 'i' ) ( 'M' | 'm' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ; -kU_UnionType - : UNION SP? '(' SP? kU_ColumnDefinitions SP? ')' ; +rU_UnionType + : UNION SP? '(' SP? rU_ColumnDefinitions SP? ')' ; -kU_StructType - : STRUCT SP? '(' SP? kU_ColumnDefinitions SP? ')' ; +rU_StructType + : STRUCT SP? '(' SP? rU_ColumnDefinitions SP? ')' ; -kU_MapType - : MAP SP? '(' SP? kU_DataType SP? ',' SP? kU_DataType SP? ')' ; +rU_MapType + : MAP SP? '(' SP? rU_DataType SP? ',' SP? rU_DataType SP? ')' ; -kU_DecimalType +rU_DecimalType : DECIMAL SP? '(' SP? oC_IntegerLiteral SP? ',' SP? oC_IntegerLiteral SP? ')' ; -kU_DataType +rU_DataType : oC_SymbolicName - | kU_DataType kU_ListIdentifiers - | kU_UnionType - | kU_StructType - | kU_MapType - | kU_DecimalType ; + | rU_DataType rU_ListIdentifiers + | rU_UnionType + | rU_StructType + | rU_MapType + | rU_DecimalType ; -kU_ListIdentifiers : kU_ListIdentifier ( kU_ListIdentifier )* ; +rU_ListIdentifiers : rU_ListIdentifier ( rU_ListIdentifier )* ; -kU_ListIdentifier : '[' oC_IntegerLiteral? ']' ; +rU_ListIdentifier : '[' oC_IntegerLiteral? ']' ; oC_AnyCypherOption : oC_Explain @@ -229,29 +229,29 @@ oC_Explain oC_Profile : PROFILE ; -kU_Transaction +rU_Transaction : BEGIN SP TRANSACTION | BEGIN SP TRANSACTION SP READ SP ONLY | COMMIT | ROLLBACK | CHECKPOINT; -kU_Extension - : kU_LoadExtension - | kU_InstallExtension - | kU_UninstallExtension - | kU_UpdateExtension ; +rU_Extension + : rU_LoadExtension + | rU_InstallExtension + | rU_UninstallExtension + | rU_UpdateExtension ; -kU_LoadExtension +rU_LoadExtension : LOAD SP (EXTENSION SP)? ( StringLiteral | oC_Variable ) ; -kU_InstallExtension +rU_InstallExtension : (FORCE SP)? INSTALL SP oC_Variable (SP FROM SP StringLiteral)?; -kU_UninstallExtension +rU_UninstallExtension : UNINSTALL SP oC_Variable; -kU_UpdateExtension +rU_UpdateExtension : UPDATE SP oC_Variable; oC_Query @@ -277,9 +277,9 @@ oC_SinglePartQuery ; oC_MultiPartQuery - : ( kU_QueryPart SP? )+ oC_SinglePartQuery; + : ( rU_QueryPart SP? )+ oC_SinglePartQuery; -kU_QueryPart +rU_QueryPart : (oC_ReadingClause SP? )* ( oC_UpdatingClause SP? )* oC_With ; oC_UpdatingClause @@ -292,12 +292,12 @@ oC_UpdatingClause oC_ReadingClause : oC_Match | oC_Unwind - | kU_InQueryCall - | kU_LoadFrom + | rU_InQueryCall + | rU_LoadFrom ; -kU_LoadFrom - : LOAD ( SP WITH SP HEADERS SP? '(' SP? kU_ColumnDefinitions SP? ')' )? SP FROM SP kU_ScanSource (SP? '(' SP? kU_Options SP? ')')? (SP? oC_Where)? ; +rU_LoadFrom + : LOAD ( SP WITH SP HEADERS SP? '(' SP? rU_ColumnDefinitions SP? ')' )? SP FROM SP rU_ScanSource (SP? '(' SP? rU_Options SP? ')')? (SP? oC_Where)? ; oC_YieldItem @@ -306,19 +306,19 @@ oC_YieldItem oC_YieldItems : oC_YieldItem ( SP? ',' SP? oC_YieldItem )* ; -kU_InQueryCall +rU_InQueryCall : CALL SP oC_FunctionInvocation (SP? oC_Where)? ( SP? YIELD SP oC_YieldItems )? ; oC_Match - : ( OPTIONAL SP )? MATCH SP? oC_Pattern ( SP oC_Where )? ( SP kU_Hint )? ; + : ( OPTIONAL SP )? MATCH SP? oC_Pattern ( SP oC_Where )? ( SP rU_Hint )? ; -kU_Hint - : HINT SP kU_JoinNode; +rU_Hint + : HINT SP rU_JoinNode; -kU_JoinNode - : kU_JoinNode SP JOIN SP kU_JoinNode - | kU_JoinNode ( SP MULTI_JOIN SP oC_SchemaName)+ - | '(' SP? kU_JoinNode SP? ')' +rU_JoinNode + : rU_JoinNode SP JOIN SP rU_JoinNode + | rU_JoinNode ( SP MULTI_JOIN SP oC_SchemaName)+ + | '(' SP? rU_JoinNode SP? ')' | oC_SchemaName ; oC_Unwind : UNWIND SP? oC_Expression SP AS SP oC_Variable ; @@ -337,7 +337,7 @@ oC_MergeAction oC_Set : SET SP? oC_SetItem ( SP? ',' SP? oC_SetItem )* - | SET SP? oC_Atom SP? '=' SP? kU_Properties; + | SET SP? oC_Atom SP? '=' SP? rU_Properties; oC_SetItem : ( oC_PropertyExpression SP? '=' SP? oC_Expression ) ; @@ -399,7 +399,7 @@ oC_PatternElement ; oC_NodePattern - : '(' SP? ( oC_Variable SP? )? ( oC_NodeLabels SP? )? ( kU_Properties SP? )? ')' ; + : '(' SP? ( oC_Variable SP? )? ( oC_NodeLabels SP? )? ( rU_Properties SP? )? ')' ; oC_PatternElementChain : oC_RelationshipPattern SP? oC_NodePattern ; @@ -411,12 +411,12 @@ oC_RelationshipPattern ; oC_RelationshipDetail - : '[' SP? ( oC_Variable SP? )? ( oC_RelationshipTypes SP? )? ( kU_RecursiveDetail SP? )? ( kU_Properties SP? )? ']' ; + : '[' SP? ( oC_Variable SP? )? ( oC_RelationshipTypes SP? )? ( rU_RecursiveDetail SP? )? ( rU_Properties SP? )? ']' ; // The original oC_Properties definition is oC_MapLiteral | oC_Parameter. // We choose to not support parameter as properties which will be the decision for a long time. // We then substitute with oC_MapLiteral definition. We create oC_MapLiteral only when we decide to add MAP type. -kU_Properties +rU_Properties : '{' SP? ( oC_PropertyKeyName SP? ':' SP? oC_Expression SP? ( ',' SP? oC_PropertyKeyName SP? ':' SP? oC_Expression SP? )* )? '}'; oC_RelationshipTypes @@ -425,10 +425,10 @@ oC_RelationshipTypes oC_NodeLabels : ':' SP? oC_LabelName ( SP? ('|' ':'? | ':') SP? oC_LabelName )* ; -kU_RecursiveDetail - : '*' ( SP? kU_RecursiveType)? ( SP? oC_RangeLiteral )? ( SP? kU_RecursiveComprehension )? ; +rU_RecursiveDetail + : '*' ( SP? rU_RecursiveType)? ( SP? oC_RangeLiteral )? ( SP? rU_RecursiveComprehension )? ; -kU_RecursiveType +rU_RecursiveType : (ALL SP)? WSHORTEST SP? '(' SP? oC_PropertyKeyName SP? ')' | SHORTEST | ALL SP SHORTEST @@ -439,10 +439,10 @@ oC_RangeLiteral : oC_LowerBound? SP? DOTDOT SP? oC_UpperBound? | oC_IntegerLiteral ; -kU_RecursiveComprehension - : '(' SP? oC_Variable SP? ',' SP? oC_Variable ( SP? '|' SP? oC_Where SP? )? ( SP? '|' SP? kU_RecursiveProjectionItems SP? ',' SP? kU_RecursiveProjectionItems SP? )? ')' ; +rU_RecursiveComprehension + : '(' SP? oC_Variable SP? ',' SP? oC_Variable ( SP? '|' SP? oC_Where SP? )? ( SP? '|' SP? rU_RecursiveProjectionItems SP? ',' SP? rU_RecursiveProjectionItems SP? )? ')' ; -kU_RecursiveProjectionItems +rU_RecursiveProjectionItems : '{' SP? oC_ProjectionItems? SP? '}' ; oC_LowerBound @@ -473,35 +473,35 @@ oC_NotExpression : ( NOT SP? )* oC_ComparisonExpression; oC_ComparisonExpression - : kU_BitwiseOrOperatorExpression ( SP? kU_ComparisonOperator SP? kU_BitwiseOrOperatorExpression )? - | kU_BitwiseOrOperatorExpression ( SP? INVALID_NOT_EQUAL SP? kU_BitwiseOrOperatorExpression ) { notifyInvalidNotEqualOperator($INVALID_NOT_EQUAL); } - | kU_BitwiseOrOperatorExpression SP? kU_ComparisonOperator SP? kU_BitwiseOrOperatorExpression ( SP? kU_ComparisonOperator SP? kU_BitwiseOrOperatorExpression )+ { notifyNonBinaryComparison($ctx->start); } + : rU_BitwiseOrOperatorExpression ( SP? rU_ComparisonOperator SP? rU_BitwiseOrOperatorExpression )? + | rU_BitwiseOrOperatorExpression ( SP? INVALID_NOT_EQUAL SP? rU_BitwiseOrOperatorExpression ) { notifyInvalidNotEqualOperator($INVALID_NOT_EQUAL); } + | rU_BitwiseOrOperatorExpression SP? rU_ComparisonOperator SP? rU_BitwiseOrOperatorExpression ( SP? rU_ComparisonOperator SP? rU_BitwiseOrOperatorExpression )+ { notifyNonBinaryComparison($ctx->start); } ; -kU_ComparisonOperator : '=' | '<>' | '<' | '<=' | '>' | '>=' ; +rU_ComparisonOperator : '=' | '<>' | '<' | '<=' | '>' | '>=' ; INVALID_NOT_EQUAL : '!=' ; -kU_BitwiseOrOperatorExpression - : kU_BitwiseAndOperatorExpression ( SP? '|' SP? kU_BitwiseAndOperatorExpression )* ; +rU_BitwiseOrOperatorExpression + : rU_BitwiseAndOperatorExpression ( SP? '|' SP? rU_BitwiseAndOperatorExpression )* ; -kU_BitwiseAndOperatorExpression - : kU_BitShiftOperatorExpression ( SP? '&' SP? kU_BitShiftOperatorExpression )* ; +rU_BitwiseAndOperatorExpression + : rU_BitShiftOperatorExpression ( SP? '&' SP? rU_BitShiftOperatorExpression )* ; -kU_BitShiftOperatorExpression - : oC_AddOrSubtractExpression ( SP? kU_BitShiftOperator SP? oC_AddOrSubtractExpression )* ; +rU_BitShiftOperatorExpression + : oC_AddOrSubtractExpression ( SP? rU_BitShiftOperator SP? oC_AddOrSubtractExpression )* ; -kU_BitShiftOperator : '>>' | '<<' ; +rU_BitShiftOperator : '>>' | '<<' ; oC_AddOrSubtractExpression - : oC_MultiplyDivideModuloExpression ( SP? kU_AddOrSubtractOperator SP? oC_MultiplyDivideModuloExpression )* ; + : oC_MultiplyDivideModuloExpression ( SP? rU_AddOrSubtractOperator SP? oC_MultiplyDivideModuloExpression )* ; -kU_AddOrSubtractOperator : '+' | '-' ; +rU_AddOrSubtractOperator : '+' | '-' ; oC_MultiplyDivideModuloExpression - : oC_PowerOfExpression ( SP? kU_MultiplyDivideModuloOperator SP? oC_PowerOfExpression )* ; + : oC_PowerOfExpression ( SP? rU_MultiplyDivideModuloOperator SP? oC_PowerOfExpression )* ; -kU_MultiplyDivideModuloOperator : '*' | '/' | '%' ; +rU_MultiplyDivideModuloOperator : '*' | '/' | '%' ; oC_PowerOfExpression : oC_StringListNullOperatorExpression ( SP? '^' SP? oC_StringListNullOperatorExpression )* ; @@ -569,7 +569,7 @@ oC_Literal | oC_BooleanLiteral | NULL | oC_ListLiteral - | kU_StructLiteral + | rU_StructLiteral ; oC_BooleanLiteral @@ -578,15 +578,15 @@ oC_BooleanLiteral ; oC_ListLiteral - : '[' SP? ( oC_Expression SP? ( kU_ListEntry SP? )* )? ']' ; + : '[' SP? ( oC_Expression SP? ( rU_ListEntry SP? )* )? ']' ; -kU_ListEntry +rU_ListEntry : ',' SP? oC_Expression? ; -kU_StructLiteral - : '{' SP? kU_StructField SP? ( ',' SP? kU_StructField SP? )* '}' ; +rU_StructLiteral + : '{' SP? rU_StructField SP? ( ',' SP? rU_StructField SP? )* '}' ; -kU_StructField +rU_StructField : ( oC_SymbolicName | StringLiteral ) SP? ':' SP? oC_Expression ; oC_ParenthesizedExpression @@ -594,20 +594,20 @@ oC_ParenthesizedExpression oC_FunctionInvocation : COUNT SP? '(' SP? '*' SP? ')' - | CAST SP? '(' SP? kU_FunctionParameter SP? ( ( AS SP? kU_DataType ) | ( ',' SP? kU_FunctionParameter ) ) SP? ')' - | oC_FunctionName SP? '(' SP? ( DISTINCT SP? )? ( kU_FunctionParameter SP? ( ',' SP? kU_FunctionParameter SP? )* )? ')' ; + | CAST SP? '(' SP? rU_FunctionParameter SP? ( ( AS SP? rU_DataType ) | ( ',' SP? rU_FunctionParameter ) ) SP? ')' + | oC_FunctionName SP? '(' SP? ( DISTINCT SP? )? ( rU_FunctionParameter SP? ( ',' SP? rU_FunctionParameter SP? )* )? ')' ; oC_FunctionName : oC_SymbolicName ; -kU_FunctionParameter +rU_FunctionParameter : ( oC_SymbolicName SP? ':' '=' SP? )? oC_Expression - | kU_LambdaParameter ; + | rU_LambdaParameter ; -kU_LambdaParameter - : kU_LambdaVars SP? '-' '>' SP? oC_Expression SP? ; +rU_LambdaParameter + : rU_LambdaVars SP? '-' '>' SP? oC_Expression SP? ; -kU_LambdaVars +rU_LambdaVars : oC_SymbolicName | '(' SP? oC_SymbolicName SP? ( ',' SP? oC_SymbolicName SP?)* ')' ; @@ -615,7 +615,7 @@ oC_PathPatterns : oC_NodePattern ( SP? oC_PatternElementChain )+; oC_ExistCountSubquery - : (EXISTS | COUNT) SP? '{' SP? MATCH SP? oC_Pattern ( SP? oC_Where )? ( SP? kU_Hint )? SP? '}' ; + : (EXISTS | COUNT) SP? '{' SP? MATCH SP? oC_Pattern ( SP? oC_Where )? ( SP? rU_Hint )? SP? '}' ; oC_PropertyLookup : '.' SP? ( oC_PropertyKeyName | STAR ) ; @@ -715,11 +715,11 @@ oC_SymbolicName : UnescapedSymbolicName | EscapedSymbolicName {if ($EscapedSymbolicName.text == "``") { notifyEmptyToken($EscapedSymbolicName); }} | HexLetter - | kU_NonReservedKeywords + | rU_NonReservedKeywords ; // example of BEGIN and END: TCKWith2.Scenario1 -kU_NonReservedKeywords +rU_NonReservedKeywords : COMMENT | ADD | ALTER diff --git a/src/binder/bind/bind_ddl.cpp b/src/binder/bind/bind_ddl.cpp index 57772f95e9..91f4d20fed 100644 --- a/src/binder/bind/bind_ddl.cpp +++ b/src/binder/bind/bind_ddl.cpp @@ -131,7 +131,7 @@ BoundCreateTableInfo Binder::bindCreateTableInfo(const CreateTableInfo* info) { return bindCreateRelTableGroupInfo(info); } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -287,7 +287,7 @@ std::unique_ptr Binder::bindCreateTableAs(const Statement& state return boundCreateTable; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -394,7 +394,7 @@ std::unique_ptr Binder::bindAlter(const Statement& statement) { return bindAlterFromToConnection(statement); } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/binder/bind/bind_export_database.cpp b/src/binder/bind/bind_export_database.cpp index bda2bc458e..15ec972c51 100644 --- a/src/binder/bind/bind_export_database.cpp +++ b/src/binder/bind/bind_export_database.cpp @@ -42,7 +42,7 @@ FileTypeInfo getFileType(case_insensitive_map_t& options) { void bindExportTableData(ExportedTableData& tableData, const std::string& query, main::ClientContext* context, Binder* binder) { auto parsedStatement = Parser::parseQuery(query); - KU_ASSERT(parsedStatement.size() == 1); + RYU_ASSERT(parsedStatement.size() == 1); auto parsedQuery = parsedStatement[0]->constPtrCast(); context->setUseInternalCatalogEntry(true /* useInternalCatalogEntry */); auto boundQuery = binder->bindQuery(*parsedQuery); @@ -107,7 +107,7 @@ static std::vector getExportInfo(const Catalog& catalog, if (entry == nullptr) { continue; } - KU_ASSERT(entry->getTableType() == TableType::NODE); + RYU_ASSERT(entry->getTableType() == TableType::NODE); tableData.tableName = entry->getName(); tableData.fileName = entry->getName() + "." + StringUtils::getLower(fileTypeInfo.fileTypeStr); diff --git a/src/binder/bind/bind_extension.cpp b/src/binder/bind/bind_extension.cpp index 8d1ce6fc8d..2609b5f2d2 100644 --- a/src/binder/bind/bind_extension.cpp +++ b/src/binder/bind/bind_extension.cpp @@ -67,7 +67,7 @@ std::unique_ptr Binder::bindExtension(const Statement& statement bindUninstallExtension(*auxInfo); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } if (ExtensionUtils::isOfficialExtension(auxInfo->path)) { common::StringUtils::toLower(auxInfo->path); diff --git a/src/binder/bind/bind_extension_clause.cpp b/src/binder/bind/bind_extension_clause.cpp index 884c2ccdba..ae94a9493f 100644 --- a/src/binder/bind/bind_extension_clause.cpp +++ b/src/binder/bind/bind_extension_clause.cpp @@ -14,7 +14,7 @@ std::unique_ptr Binder::bindExtensionClause(const parser::Statem return boundStatement; } } - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // namespace binder diff --git a/src/binder/bind/bind_file_scan.cpp b/src/binder/bind/bind_file_scan.cpp index d352bbde4a..f6ee74470d 100644 --- a/src/binder/bind/bind_file_scan.cpp +++ b/src/binder/bind/bind_file_scan.cpp @@ -80,7 +80,7 @@ case_insensitive_map_t Binder::bindParsingOptions(const options_t& parsin auto name = option.first; StringUtils::toUpper(name); auto expr = expressionBinder.bindExpression(*option.second); - KU_ASSERT(expr->expressionType == ExpressionType::LITERAL); + RYU_ASSERT(expr->expressionType == ExpressionType::LITERAL); auto literalExpr = ku_dynamic_cast(expr.get()); options.insert({name, literalExpr->getValue()}); } @@ -107,7 +107,7 @@ std::unique_ptr Binder::bindScanSource(const BaseScanSource return bindParameterScanSource(*source, options, columnNames, columnTypes); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/binder/bind/bind_graph_pattern.cpp b/src/binder/bind/bind_graph_pattern.cpp index 6d199a522e..6c4bdf4b6b 100644 --- a/src/binder/bind/bind_graph_pattern.cpp +++ b/src/binder/bind/bind_graph_pattern.cpp @@ -105,7 +105,7 @@ std::shared_ptr Binder::createPath(const std::string& pathName, nodeFields); extraFieldFromStructType(recursiveInfo->rel->getDataType(), relFieldNameSet, relFields); } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } auto nodeType = LogicalType::NODE(std::move(nodeFields)); @@ -175,7 +175,7 @@ static void checkRelDirectionTypeAgainstStorageDirection(const RelExpression* re } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -216,7 +216,7 @@ std::shared_ptr Binder::bindQueryRel(const RelPattern& relPattern directionType = RelDirectionType::BOTH; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } // bind variable length std::shared_ptr queryRel; @@ -261,7 +261,7 @@ static std::vector getBaseRelStructFields() { static std::shared_ptr construct(LogicalType type, const std::string& propertyName, const Expression& child) { - KU_ASSERT(child.expressionType == ExpressionType::PATTERN); + RYU_ASSERT(child.expressionType == ExpressionType::PATTERN); auto& patternExpr = child.constCast(); auto variableName = patternExpr.getVariableName(); auto uniqueName = patternExpr.getUniqueName(); diff --git a/src/binder/bind/bind_import_database.cpp b/src/binder/bind/bind_import_database.cpp index 526dc68a41..2952c2d33b 100644 --- a/src/binder/bind/bind_import_database.cpp +++ b/src/binder/bind/bind_import_database.cpp @@ -97,12 +97,12 @@ std::unique_ptr Binder::bindImportDatabaseClause(const Statement if (!copyQuery.empty()) { auto parsedStatements = Parser::parseQuery(copyQuery); for (auto& parsedStatement : parsedStatements) { - KU_ASSERT(parsedStatement->getStatementType() == StatementType::COPY_FROM); + RYU_ASSERT(parsedStatement->getStatementType() == StatementType::COPY_FROM); auto& copyFromStatement = parsedStatement->constCast(); - KU_ASSERT(copyFromStatement.getSource()->type == ScanSourceType::FILE); + RYU_ASSERT(copyFromStatement.getSource()->type == ScanSourceType::FILE); auto filePaths = copyFromStatement.getSource()->constPtrCast()->filePaths; - KU_ASSERT(filePaths.size() == 1); + RYU_ASSERT(filePaths.size() == 1); auto fileTypeInfo = bindFileTypeInfo(filePaths); std::string query; auto copyFilePath = getCopyFilePath(boundFilePath, filePaths[0]); @@ -110,7 +110,7 @@ std::unique_ptr Binder::bindImportDatabaseClause(const Statement auto parsingOptions = bindParsingOptions(copyFromStatement.getParsingOptions()); std::unordered_map copyFromOptions; if (parsingOptions.contains(CopyConstants::FROM_OPTION_NAME)) { - KU_ASSERT(parsingOptions.contains(CopyConstants::TO_OPTION_NAME)); + RYU_ASSERT(parsingOptions.contains(CopyConstants::TO_OPTION_NAME)); copyFromOptions[CopyConstants::FROM_OPTION_NAME] = stringFormat("'{}'", parsingOptions.at(CopyConstants::FROM_OPTION_NAME).getValue()); copyFromOptions[CopyConstants::TO_OPTION_NAME] = stringFormat("'{}'", diff --git a/src/binder/bind/bind_projection_clause.cpp b/src/binder/bind/bind_projection_clause.cpp index f84c570ebc..c174fed041 100644 --- a/src/binder/bind/bind_projection_clause.cpp +++ b/src/binder/bind/bind_projection_clause.cpp @@ -77,7 +77,7 @@ BoundReturnClause Binder::bindReturnClause(const ReturnClause& returnClause) { auto columnNames = getColumnNames(projectionExprs, aliases); auto boundProjectionBody = bindProjectionBody(*projectionBody, projectionExprs, aliases); auto statementResult = BoundStatementResult(); - KU_ASSERT(columnNames.size() == projectionExprs.size()); + RYU_ASSERT(columnNames.size() == projectionExprs.size()); for (auto i = 0u; i < columnNames.size(); ++i) { statementResult.addColumn(columnNames[i], projectionExprs[i]); } @@ -169,7 +169,7 @@ class NestedAggCollector final : public ExpressionVisitor { }; static void validateNestedAggregate(const Expression& expr, const BinderScope& scope) { - KU_ASSERT(expr.expressionType == ExpressionType::AGGREGATE_FUNCTION); + RYU_ASSERT(expr.expressionType == ExpressionType::AGGREGATE_FUNCTION); if (expr.getNumChildren() == 0) { // Skip COUNT(*) return; } @@ -187,7 +187,7 @@ BoundProjectionBody Binder::bindProjectionBody(const parser::ProjectionBody& pro const expression_vector& projectionExprs, const std::vector& aliases) { expression_vector groupByExprs; expression_vector aggregateExprs; - KU_ASSERT(projectionExprs.size() == aliases.size()); + RYU_ASSERT(projectionExprs.size() == aliases.size()); for (auto i = 0u; i < projectionExprs.size(); ++i) { auto expr = projectionExprs[i]; auto aggExprs = getAggregateExpressions(expr, scope); @@ -233,7 +233,7 @@ BoundProjectionBody Binder::bindProjectionBody(const parser::ProjectionBody& pro expression_vector orderByExprs; if (boundProjectionBody.hasAggregateExpressions() || boundProjectionBody.isDistinct()) { scope.clear(); - KU_ASSERT(projectionBody.getProjectionExpressions().size() == projectionExprs.size()); + RYU_ASSERT(projectionBody.getProjectionExpressions().size() == projectionExprs.size()); std::vector tmpAliases; for (auto& expr : projectionBody.getProjectionExpressions()) { tmpAliases.push_back(expr->hasAlias() ? expr->getAlias() : expr->toString()); diff --git a/src/binder/bind/bind_query.cpp b/src/binder/bind/bind_query.cpp index e934e645be..3cb5f4783c 100644 --- a/src/binder/bind/bind_query.cpp +++ b/src/binder/bind/bind_query.cpp @@ -51,7 +51,7 @@ std::unique_ptr Binder::bindQuery(const Statement& statement) normalizedSingleQueries.push_back(bindSingleQuery(*regularQuery.getSingleQuery(i))); } validateUnionColumnsOfTheSameType(normalizedSingleQueries); - KU_ASSERT(!normalizedSingleQueries.empty()); + RYU_ASSERT(!normalizedSingleQueries.empty()); auto boundRegularQuery = std::make_unique(regularQuery.getIsUnionAll(), normalizedSingleQueries[0].getStatementResult()->copy()); for (auto& normalizedSingleQuery : normalizedSingleQueries) { diff --git a/src/binder/bind/bind_reading_clause.cpp b/src/binder/bind/bind_reading_clause.cpp index f25eeac387..27471ab6d4 100644 --- a/src/binder/bind/bind_reading_clause.cpp +++ b/src/binder/bind/bind_reading_clause.cpp @@ -22,7 +22,7 @@ std::unique_ptr Binder::bindReadingClause(const ReadingClaus return bindLoadFrom(readingClause); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/binder/bind/bind_standalone_call_function.cpp b/src/binder/bind/bind_standalone_call_function.cpp index b49518ab87..611cf2cee2 100644 --- a/src/binder/bind/bind_standalone_call_function.cpp +++ b/src/binder/bind/bind_standalone_call_function.cpp @@ -22,7 +22,7 @@ std::unique_ptr Binder::bindStandaloneCallFunction( auto transaction = transaction::Transaction::Get(*clientContext); auto entry = catalog->getFunctionEntry(transaction, funcName, clientContext->useInternalCatalogEntry()); - KU_ASSERT(entry); + RYU_ASSERT(entry); if (entry->getType() != catalog::CatalogEntryType::STANDALONE_TABLE_FUNCTION_ENTRY) { throw BinderException( "Only standalone table functions can be called without return statement."); diff --git a/src/binder/bind/bind_updating_clause.cpp b/src/binder/bind/bind_updating_clause.cpp index 04b0797468..a2788974d8 100644 --- a/src/binder/bind/bind_updating_clause.cpp +++ b/src/binder/bind/bind_updating_clause.cpp @@ -42,7 +42,7 @@ std::unique_ptr Binder::bindUpdatingClause( return bindDeleteClause(updatingClause); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -177,9 +177,9 @@ void Binder::bindInsertNode(std::shared_ptr node, throw BinderException( "Create node " + node->toString() + " with empty node labels is not supported."); } - KU_ASSERT(node->getNumEntries() == 1); + RYU_ASSERT(node->getNumEntries() == 1); auto entry = node->getEntry(0); - KU_ASSERT(entry->getTableType() == TableType::NODE); + RYU_ASSERT(entry->getTableType() == TableType::NODE); auto insertInfo = BoundInsertInfo(TableType::NODE, node); for (auto& property : node->getPropertyExpressions()) { if (property->hasProperty(entry->getTableID())) { @@ -207,7 +207,7 @@ static TableCatalogEntry* tryPruneMultiLabeled(const RelExpression& rel, const TableCatalogEntry& srcEntry, const TableCatalogEntry& dstEntry) { std::vector candidates; for (auto& entry : rel.getEntries()) { - KU_ASSERT(entry->getType() == CatalogEntryType::REL_GROUP_ENTRY); + RYU_ASSERT(entry->getType() == CatalogEntryType::REL_GROUP_ENTRY); auto& relEntry = entry->constCast(); if (relEntry.hasRelEntryInfo(srcEntry.getTableID(), dstEntry.getTableID())) { candidates.push_back(entry); @@ -240,7 +240,7 @@ void Binder::bindInsertRel(std::shared_ptr rel, } TableCatalogEntry* entry = nullptr; if (!rel->isMultiLabeled()) { - KU_ASSERT(rel->getNumEntries() == 1); + RYU_ASSERT(rel->getNumEntries() == 1); entry = rel->getEntry(0); } else { auto srcEntry = rel->getSrcNode()->getEntry(0); diff --git a/src/binder/bind/copy/bind_copy_from.cpp b/src/binder/bind/copy/bind_copy_from.cpp index b12a331ba1..1f837d7f95 100644 --- a/src/binder/bind/copy/bind_copy_from.cpp +++ b/src/binder/bind/copy/bind_copy_from.cpp @@ -61,7 +61,7 @@ std::unique_ptr Binder::bindCopyFromClause(const Statement& stat case CatalogEntryType::REL_GROUP_ENTRY: { auto entry = tableEntry->ptrCast(); auto properties = entry->getProperties(); - KU_ASSERT(entry->getNumRelTables() > 0); + RYU_ASSERT(entry->getNumRelTables() > 0); if (entry->getNumRelTables() == 1) { auto fromToNodePair = entry->getSingleRelEntryInfo().nodePair; auto fromTable = catalog->getTableCatalogEntry(transaction, fromToNodePair.srcTableID); @@ -84,7 +84,7 @@ std::unique_ptr Binder::bindCopyFromClause(const Statement& stat } } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -316,7 +316,7 @@ static void bindExpectedColumns(const TableCatalogEntry& entry, const CopyFromCo void bindExpectedNodeColumns(const NodeTableCatalogEntry& entry, const CopyFromColumnInfo& info, std::vector& columnNames, std::vector& columnTypes) { - KU_ASSERT(columnNames.empty() && columnTypes.empty()); + RYU_ASSERT(columnNames.empty() && columnTypes.empty()); bindExpectedColumns(entry, info, columnNames, columnTypes); } @@ -324,7 +324,7 @@ void bindExpectedRelColumns(const RelGroupCatalogEntry& entry, const NodeTableCatalogEntry& fromEntry, const NodeTableCatalogEntry& toEntry, const CopyFromColumnInfo& info, std::vector& columnNames, std::vector& columnTypes) { - KU_ASSERT(columnNames.empty() && columnTypes.empty()); + RYU_ASSERT(columnNames.empty() && columnTypes.empty()); columnNames.push_back("from"); columnNames.push_back("to"); auto srcPKColumnType = fromEntry.getPrimaryKeyDefinition().getType().copy(); diff --git a/src/binder/bind_expression/bind_comparison_expression.cpp b/src/binder/bind_expression/bind_comparison_expression.cpp index 49dfa36585..4cf819b594 100644 --- a/src/binder/bind_expression/bind_comparison_expression.cpp +++ b/src/binder/bind_expression/bind_comparison_expression.cpp @@ -39,7 +39,7 @@ static bool isNodeOrRel(const Expression& expression) { std::shared_ptr ExpressionBinder::bindComparisonExpression( ExpressionType expressionType, const expression_vector& children) { // Rewrite node or rel comparison - KU_ASSERT(children.size() == 2); + RYU_ASSERT(children.size() == 2); if (isNodeOrRel(*children[0]) && isNodeOrRel(*children[1])) { expression_vector newChildren; // For pattern expressions (NODE/REL), use getInternalID() directly diff --git a/src/binder/bind_expression/bind_function_expression.cpp b/src/binder/bind_expression/bind_function_expression.cpp index 52e0334c8e..fd3490fc66 100644 --- a/src/binder/bind_expression/bind_function_expression.cpp +++ b/src/binder/bind_expression/bind_function_expression.cpp @@ -140,7 +140,7 @@ std::shared_ptr ExpressionBinder::bindRewriteFunctionExpression( auto match = BuiltInFunctionsUtils::matchFunction(functionName, childrenTypes, entry->ptrCast()); auto function = match->constPtrCast(); - KU_ASSERT(function->rewriteFunc != nullptr); + RYU_ASSERT(function->rewriteFunc != nullptr); auto input = RewriteFunctionBindInput(context, this, children); return function->rewriteFunc(input); } diff --git a/src/binder/bind_expression/bind_subquery_expression.cpp b/src/binder/bind_expression/bind_subquery_expression.cpp index b35f3e3ea7..d7ae4d37b8 100644 --- a/src/binder/bind_expression/bind_subquery_expression.cpp +++ b/src/binder/bind_expression/bind_subquery_expression.cpp @@ -56,7 +56,7 @@ std::shared_ptr ExpressionBinder::bindSubqueryExpression( expression_vector{countStarExpr, literalExpr}); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } // Use the same unique identifier for projection & subquery expression. We will replace subquery // expression with projection expression during processing. diff --git a/src/binder/binder.cpp b/src/binder/binder.cpp index b6c00e11f7..facb1ab4ca 100644 --- a/src/binder/binder.cpp +++ b/src/binder/binder.cpp @@ -88,7 +88,7 @@ std::unique_ptr Binder::bind(const Statement& statement) { boundStatement = bindExtensionClause(statement); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } BoundStatementRewriter::rewrite(*boundStatement, *clientContext); @@ -130,7 +130,7 @@ std::shared_ptr Binder::createInvisibleVariable(const std::string& n expression_vector Binder::createVariables(const std::vector& names, const std::vector& types) { - KU_ASSERT(names.size() == types.size()); + RYU_ASSERT(names.size() == types.size()); expression_vector variables; for (auto i = 0u; i < names.size(); ++i) { variables.push_back(createVariable(names[i], types[i])); @@ -140,7 +140,7 @@ expression_vector Binder::createVariables(const std::vector& names, expression_vector Binder::createInvisibleVariables(const std::vector& names, const std::vector& types) const { - KU_ASSERT(names.size() == types.size()); + RYU_ASSERT(names.size() == types.size()); expression_vector variables; for (auto i = 0u; i < names.size(); ++i) { variables.push_back(createInvisibleVariable(names[i], types[i])); @@ -190,7 +190,7 @@ bool Binder::reservedInPropertyLookup(const std::string& name) { } void Binder::addToScope(const std::vector& names, const expression_vector& exprs) { - KU_ASSERT(names.size() == exprs.size()); + RYU_ASSERT(names.size() == exprs.size()); for (auto i = 0u; i < names.size(); ++i) { addToScope(names[i], exprs[i]); } @@ -269,7 +269,7 @@ TableFunction Binder::getScanFunction(const FileTypeInfo& typeInfo, } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return *func->ptrCast(); } diff --git a/src/binder/binder_scope.cpp b/src/binder/binder_scope.cpp index b82b8a8d07..bc32ff99b8 100644 --- a/src/binder/binder_scope.cpp +++ b/src/binder/binder_scope.cpp @@ -11,7 +11,7 @@ void BinderScope::addExpression(const std::string& varName, void BinderScope::replaceExpression(const std::string& oldName, const std::string& newName, std::shared_ptr expression) { - KU_ASSERT(nameToExprIdx.contains(oldName)); + RYU_ASSERT(nameToExprIdx.contains(oldName)); auto idx = nameToExprIdx.at(oldName); expressions[idx] = std::move(expression); nameToExprIdx.erase(oldName); diff --git a/src/binder/bound_scan_source.cpp b/src/binder/bound_scan_source.cpp index f75f9475f0..479f44d243 100644 --- a/src/binder/bound_scan_source.cpp +++ b/src/binder/bound_scan_source.cpp @@ -12,7 +12,7 @@ expression_vector BoundTableScanSource::getWarningColumns() const { case ScanSourceType::FILE: { auto bindData = info.bindData->constPtrCast(); for (auto i = bindData->numWarningDataColumns; i >= 1; --i) { - KU_ASSERT(i < columns.size()); + RYU_ASSERT(i < columns.size()); warningDataExprs.push_back(columns[columns.size() - i]); } } break; diff --git a/src/binder/bound_statement_visitor.cpp b/src/binder/bound_statement_visitor.cpp index 86ae5e3186..41dd015dc4 100644 --- a/src/binder/bound_statement_visitor.cpp +++ b/src/binder/bound_statement_visitor.cpp @@ -74,7 +74,7 @@ void BoundStatementVisitor::visit(const BoundStatement& statement) { visitExtensionClause(statement); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -176,7 +176,7 @@ void BoundStatementVisitor::visitReadingClause(const BoundReadingClause& reading visitLoadFrom(readingClause); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -195,7 +195,7 @@ void BoundStatementVisitor::visitReadingClauseUnsafe(BoundReadingClause& reading visitLoadFrom(readingClause); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -214,7 +214,7 @@ void BoundStatementVisitor::visitUpdatingClause(const BoundUpdatingClause& updat visitMerge(updatingClause); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/binder/expression/expression_util.cpp b/src/binder/expression/expression_util.cpp index 7b878652a6..78de315583 100644 --- a/src/binder/expression/expression_util.cpp +++ b/src/binder/expression/expression_util.cpp @@ -369,7 +369,7 @@ static bool compatible(const Value& value, const LogicalType& targetType) { const auto& valType = MapType::getValueType(targetType); for (auto i = 0u; i < NestedVal::getChildrenSize(&value); ++i) { auto childVal = NestedVal::getChildVal(&value, i); - KU_ASSERT(NestedVal::getChildrenSize(childVal) == 2); + RYU_ASSERT(NestedVal::getChildrenSize(childVal) == 2); auto key = NestedVal::getChildVal(childVal, 0); auto val = NestedVal::getChildVal(childVal, 1); if (!compatible(*key, keyType) || !compatible(*val, valType)) { @@ -440,7 +440,7 @@ bool ExpressionUtil::canEvaluateAsLiteral(const Expression& expr) { } Value ExpressionUtil::evaluateAsLiteralValue(const Expression& expr) { - KU_ASSERT(canEvaluateAsLiteral(expr)); + RYU_ASSERT(canEvaluateAsLiteral(expr)); auto value = Value::createDefaultValue(expr.dataType); switch (expr.expressionType) { case ExpressionType::LITERAL: { @@ -450,7 +450,7 @@ Value ExpressionUtil::evaluateAsLiteralValue(const Expression& expr) { value = expr.constCast().getValue(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return value; } diff --git a/src/binder/expression/node_expression.cpp b/src/binder/expression/node_expression.cpp index 78ee2d6871..723fe4a4d5 100644 --- a/src/binder/expression/node_expression.cpp +++ b/src/binder/expression/node_expression.cpp @@ -11,7 +11,7 @@ std::shared_ptr NodeExpression::getPrimaryKey(common::table_id_t tab return property; } } - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // namespace binder diff --git a/src/binder/expression/property_expression.cpp b/src/binder/expression/property_expression.cpp index 7427faecba..f5ae17188e 100644 --- a/src/binder/expression/property_expression.cpp +++ b/src/binder/expression/property_expression.cpp @@ -23,7 +23,7 @@ bool PropertyExpression::isPrimaryKey(table_id_t tableID) const { } bool PropertyExpression::hasProperty(table_id_t tableID) const { - KU_ASSERT(infos.contains(tableID)); + RYU_ASSERT(infos.contains(tableID)); return infos.at(tableID).exists; } diff --git a/src/binder/expression_binder.cpp b/src/binder/expression_binder.cpp index 481050231e..7f0548f46c 100644 --- a/src/binder/expression_binder.cpp +++ b/src/binder/expression_binder.cpp @@ -146,7 +146,7 @@ std::string ExpressionBinder::getUniqueName(const std::string& name) const { } void ExpressionBinder::addParameter(const std::string& name, std::shared_ptr value) { - KU_ASSERT(!knownParameters.contains(name)); + RYU_ASSERT(!knownParameters.contains(name)); knownParameters[name] = value; } diff --git a/src/binder/query/query_graph.cpp b/src/binder/query/query_graph.cpp index f178e4ec25..92ab852c98 100644 --- a/src/binder/query/query_graph.cpp +++ b/src/binder/query/query_graph.cpp @@ -268,7 +268,7 @@ void QueryGraphCollection::finalize() { } std::vector QueryGraphCollection::mergeGraphs(common::idx_t baseGraphIdx) { - KU_ASSERT(baseGraphIdx < queryGraphs.size()); + RYU_ASSERT(baseGraphIdx < queryGraphs.size()); auto& baseGraph = queryGraphs[baseGraphIdx]; std::unordered_set mergedGraphIndices; mergedGraphIndices.insert(baseGraphIdx); diff --git a/src/binder/visitor/property_collector.cpp b/src/binder/visitor/property_collector.cpp index 1b50a319ee..3ea0b99ebf 100644 --- a/src/binder/visitor/property_collector.cpp +++ b/src/binder/visitor/property_collector.cpp @@ -26,7 +26,7 @@ expression_vector PropertyCollector::getProperties() const { } void PropertyCollector::visitSingleQuerySkipNodeRel(const NormalizedSingleQuery& singleQuery) { - KU_ASSERT(singleQuery.getNumQueryParts() != 0); + RYU_ASSERT(singleQuery.getNumQueryParts() != 0); auto numQueryParts = singleQuery.getNumQueryParts(); for (auto i = 0u; i < numQueryParts - 1; ++i) { visitQueryPartSkipNodeRel(*singleQuery.getQueryPart(i)); @@ -82,7 +82,7 @@ void PropertyCollector::visitSet(const BoundUpdatingClause& updatingClause) { } for (const auto& info : boundSetClause.getRelInfos()) { auto& rel = info.pattern->constCast(); - KU_ASSERT(!rel.isEmpty() && rel.getRelType() == QueryRelType::NON_RECURSIVE); + RYU_ASSERT(!rel.isEmpty() && rel.getRelType() == QueryRelType::NON_RECURSIVE); properties.insert(rel.getInternalID()); } } diff --git a/src/catalog/catalog.cpp b/src/catalog/catalog.cpp index ba92a29a9b..f8046b719f 100644 --- a/src/catalog/catalog.cpp +++ b/src/catalog/catalog.cpp @@ -186,7 +186,7 @@ CatalogEntry* Catalog::createRelGroupEntry(Transaction* transaction, const BoundCreateTableInfo& info) { const auto extraInfo = info.extraInfo->ptrCast(); std::vector relTableInfos; - KU_ASSERT(extraInfo->nodePairs.size() > 0); + RYU_ASSERT(extraInfo->nodePairs.size() > 0); for (auto& nodePair : extraInfo->nodePairs) { relTableInfos.emplace_back(nodePair, tables->getNextOID()); } @@ -196,7 +196,7 @@ CatalogEntry* Catalog::createRelGroupEntry(Transaction* transaction, for (auto& definition : extraInfo->propertyDefinitions) { relGroupEntry->addProperty(definition); } - KU_ASSERT(info.hasParent == false); + RYU_ASSERT(info.hasParent == false); relGroupEntry->setHasParent(info.hasParent); createSerialSequence(transaction, relGroupEntry.get(), info.isInternal); auto catalogSet = info.isInternal ? internalTables.get() : tables.get(); @@ -216,7 +216,7 @@ SequenceCatalogEntry* Catalog::getSequenceEntry(const Transaction* transaction, } else { entry = sequences->getEntry(transaction, sequenceName); } - KU_ASSERT(entry); + RYU_ASSERT(entry); return entry->ptrCast(); } @@ -226,7 +226,7 @@ SequenceCatalogEntry* Catalog::getSequenceEntry(const Transaction* transaction, if (entry == nullptr) { entry = sequences->getEntryOfOID(transaction, sequenceID); } - KU_ASSERT(entry); + RYU_ASSERT(entry); return entry->ptrCast(); } @@ -307,7 +307,7 @@ bool Catalog::containsType(const Transaction* transaction, const std::string& ty void Catalog::createIndex(Transaction* transaction, std::unique_ptr indexCatalogEntry) { - KU_ASSERT(indexCatalogEntry->getType() == CatalogEntryType::INDEX_ENTRY); + RYU_ASSERT(indexCatalogEntry->getType() == CatalogEntryType::INDEX_ENTRY); indexes->createEntry(transaction, std::move(indexCatalogEntry)); } @@ -452,7 +452,7 @@ std::vector Catalog::getMacroEntries( const Transaction* transaction) const { std::vector result; for (auto& [_, entry] : macros->getEntries(transaction)) { - KU_ASSERT(entry->getType() == CatalogEntryType::SCALAR_MACRO_ENTRY); + RYU_ASSERT(entry->getType() == CatalogEntryType::SCALAR_MACRO_ENTRY); result.push_back(entry->ptrCast()); } return result; @@ -499,7 +499,7 @@ ScalarMacroCatalogEntry* Catalog::getScalarMacroCatalogEntry(const Transaction* std::vector Catalog::getMacroNames(const Transaction* transaction) const { std::vector macroNames; for (auto& [_, function] : macros->getEntries(transaction)) { - KU_ASSERT(function->getType() == CatalogEntryType::SCALAR_MACRO_ENTRY); + RYU_ASSERT(function->getType() == CatalogEntryType::SCALAR_MACRO_ENTRY); macroNames.push_back(function->getName()); } return macroNames; @@ -534,7 +534,7 @@ CatalogEntry* Catalog::createTableEntry(Transaction* transaction, return createRelGroupEntry(transaction, info); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/catalog/catalog_entry/catalog_entry.cpp b/src/catalog/catalog_entry/catalog_entry.cpp index 24bd628016..313838eb86 100644 --- a/src/catalog/catalog_entry/catalog_entry.cpp +++ b/src/catalog/catalog_entry/catalog_entry.cpp @@ -55,7 +55,7 @@ std::unique_ptr CatalogEntry::deserialize(common::Deserializer& de entry = IndexCatalogEntry::deserialize(deserializer); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } entry->type = type; entry->name = std::move(name); diff --git a/src/catalog/catalog_entry/catalog_entry_type.cpp b/src/catalog/catalog_entry/catalog_entry_type.cpp index f07e2cefd4..f62e942f62 100644 --- a/src/catalog/catalog_entry/catalog_entry_type.cpp +++ b/src/catalog/catalog_entry/catalog_entry_type.cpp @@ -32,7 +32,7 @@ std::string CatalogEntryTypeUtils::toString(CatalogEntryType type) { case CatalogEntryType::SEQUENCE_ENTRY: return "SEQUENCE_ENTRY"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -53,7 +53,7 @@ std::string FunctionEntryTypeUtils::toString(CatalogEntryType type) { case CatalogEntryType::COPY_FUNCTION_ENTRY: return "COPY FUNCTION"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/catalog/catalog_entry/rel_group_catalog_entry.cpp b/src/catalog/catalog_entry/rel_group_catalog_entry.cpp index 505460988e..66c7a10368 100644 --- a/src/catalog/catalog_entry/rel_group_catalog_entry.cpp +++ b/src/catalog/catalog_entry/rel_group_catalog_entry.cpp @@ -57,7 +57,7 @@ bool RelGroupCatalogEntry::isParent(table_id_t tableID) { } const RelTableCatalogInfo& RelGroupCatalogEntry::getSingleRelEntryInfo() const { - KU_ASSERT(relTableInfos.size() == 1); + RYU_ASSERT(relTableInfos.size() == 1); return relTableInfos[0]; } @@ -135,7 +135,7 @@ std::string RelGroupCatalogEntry::toCypher(const ToCypherInfo& info) const { auto transaction = transaction::Transaction::Get(*relGroupInfo.context); std::stringstream ss; ss << stringFormat("CREATE REL TABLE `{}` (", getName()); - KU_ASSERT(!relTableInfos.empty()); + RYU_ASSERT(!relTableInfos.empty()); ss << getFromToStr(relTableInfos[0].nodePair, catalog, transaction); for (auto i = 1u; i < relTableInfos.size(); ++i) { ss << stringFormat(", {}", getFromToStr(relTableInfos[i].nodePair, catalog, transaction)); @@ -157,7 +157,7 @@ std::vector RelGroupCatalogEntry::getRelDataDirections() const return {RelDataDirection::FWD, RelDataDirection::BWD}; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/catalog/catalog_entry/sequence_catalog_entry.cpp b/src/catalog/catalog_entry/sequence_catalog_entry.cpp index 8838f676a2..535a63a062 100644 --- a/src/catalog/catalog_entry/sequence_catalog_entry.cpp +++ b/src/catalog/catalog_entry/sequence_catalog_entry.cpp @@ -68,7 +68,7 @@ void SequenceCatalogEntry::nextValNoLock() { // referenced from DuckDB void SequenceCatalogEntry::nextKVal(transaction::Transaction* transaction, const uint64_t& count) { - KU_ASSERT(count > 0); + RYU_ASSERT(count > 0); SequenceRollbackData rollbackData{}; { std::lock_guard lck(mtx); @@ -82,7 +82,7 @@ void SequenceCatalogEntry::nextKVal(transaction::Transaction* transaction, const void SequenceCatalogEntry::nextKVal(transaction::Transaction* transaction, const uint64_t& count, ValueVector& resultVector) { - KU_ASSERT(count > 0); + RYU_ASSERT(count > 0); SequenceRollbackData rollbackData{}; { std::lock_guard lck(mtx); diff --git a/src/catalog/catalog_entry/table_catalog_entry.cpp b/src/catalog/catalog_entry/table_catalog_entry.cpp index 58060dc389..c6e2f41890 100644 --- a/src/catalog/catalog_entry/table_catalog_entry.cpp +++ b/src/catalog/catalog_entry/table_catalog_entry.cpp @@ -14,7 +14,7 @@ namespace catalog { std::unique_ptr TableCatalogEntry::alter(transaction_t timestamp, const BoundAlterInfo& alterInfo, CatalogSet* tables) const { - KU_ASSERT(!deleted); + RYU_ASSERT(!deleted); auto newEntry = copy(); switch (alterInfo.alterType) { case AlterType::RENAME: { @@ -50,7 +50,7 @@ std::unique_ptr TableCatalogEntry::alter(transaction_t timest connectionInfo.toTableID); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } newEntry->setOID(oid); @@ -128,7 +128,7 @@ std::unique_ptr TableCatalogEntry::deserialize(Deserializer& result = RelGroupCatalogEntry::deserialize(deserializer); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } result->comment = std::move(comment); result->propertyCollection = std::move(propertyCollection); diff --git a/src/catalog/catalog_set.cpp b/src/catalog/catalog_set.cpp index 2eea018455..866ccb8452 100644 --- a/src/catalog/catalog_set.cpp +++ b/src/catalog/catalog_set.cpp @@ -58,7 +58,7 @@ CatalogEntry* CatalogSet::getEntryNoLock(const Transaction* transaction, // LCOV_EXCL_STOP const auto entry = traverseVersionChainsForTransactionNoLock(transaction, entries.at(name).get()); - KU_ASSERT(entry != nullptr && !entry->isDeleted()); + RYU_ASSERT(entry != nullptr && !entry->isDeleted()); return entry; } @@ -71,7 +71,7 @@ oid_t CatalogSet::createEntry(Transaction* transaction, std::unique_ptrsetOID(oid); entryPtr = createEntryNoLock(transaction, std::move(entry)); } - KU_ASSERT(entryPtr); + RYU_ASSERT(entryPtr); if (transaction->shouldAppendToUndoBuffer()) { transaction->pushCreateDropCatalogEntry(*this, *entryPtr, isInternal()); } @@ -150,7 +150,7 @@ void CatalogSet::dropEntry(Transaction* transaction, const std::string& name, oi std::unique_lock lck{mtx}; entryPtr = dropEntryNoLock(transaction, name, oid); } - KU_ASSERT(entryPtr); + RYU_ASSERT(entryPtr); if (transaction->shouldAppendToUndoBuffer()) { transaction->pushCreateDropCatalogEntry(*this, *entryPtr, isInternal()); } @@ -175,7 +175,7 @@ void CatalogSet::alterTableEntry(Transaction* transaction, validateExistNoLock(transaction, alterInfo.tableName); // LCOV_EXCL_STOP auto entry = getEntryNoLock(transaction, alterInfo.tableName); - KU_ASSERT(entry->getType() == CatalogEntryType::NODE_TABLE_ENTRY || + RYU_ASSERT(entry->getType() == CatalogEntryType::NODE_TABLE_ENTRY || entry->getType() == CatalogEntryType::REL_GROUP_ENTRY); const auto tableEntry = entry->ptrCast(); auto newEntry = tableEntry->alter(transaction->getID(), alterInfo, this); @@ -202,7 +202,7 @@ void CatalogSet::alterTableEntry(Transaction* transaction, } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/catalog/property_definition_collection.cpp b/src/catalog/property_definition_collection.cpp index f945d2a498..779a534e5b 100644 --- a/src/catalog/property_definition_collection.cpp +++ b/src/catalog/property_definition_collection.cpp @@ -30,7 +30,7 @@ const PropertyDefinition& PropertyDefinitionCollection::getDefinition( const PropertyDefinition& PropertyDefinitionCollection::getDefinition( property_id_t propertyID) const { - KU_ASSERT(definitions.contains(propertyID)); + RYU_ASSERT(definitions.contains(propertyID)); return definitions.at(propertyID); } @@ -39,7 +39,7 @@ column_id_t PropertyDefinitionCollection::getColumnID(const std::string& name) c } column_id_t PropertyDefinitionCollection::getColumnID(property_id_t propertyID) const { - KU_ASSERT(columnIDs.contains(propertyID)); + RYU_ASSERT(columnIDs.contains(propertyID)); return columnIDs.at(propertyID); } @@ -59,7 +59,7 @@ void PropertyDefinitionCollection::add(const PropertyDefinition& definition) { } void PropertyDefinitionCollection::drop(const std::string& name) { - KU_ASSERT(contains(name)); + RYU_ASSERT(contains(name)); auto propertyID = nameToPropertyIDMap.at(name); definitions.erase(propertyID); columnIDs.erase(propertyID); @@ -67,7 +67,7 @@ void PropertyDefinitionCollection::drop(const std::string& name) { } void PropertyDefinitionCollection::rename(const std::string& name, const std::string& newName) { - KU_ASSERT(contains(name)); + RYU_ASSERT(contains(name)); auto idx = nameToPropertyIDMap.at(name); definitions[idx].rename(newName); nameToPropertyIDMap.erase(name); @@ -85,7 +85,7 @@ column_id_t PropertyDefinitionCollection::getMaxColumnID() const { } property_id_t PropertyDefinitionCollection::getPropertyID(const std::string& name) const { - KU_ASSERT(contains(name)); + RYU_ASSERT(contains(name)); return nameToPropertyIDMap.at(name); } diff --git a/src/common/arrow/arrow_array_scan.cpp b/src/common/arrow/arrow_array_scan.cpp index 0719eed6d0..38f8f09e6a 100644 --- a/src/common/arrow/arrow_array_scan.cpp +++ b/src/common/arrow/arrow_array_scan.cpp @@ -446,7 +446,7 @@ void ArrowConverter::fromArrowArray(const ArrowSchema* schema, const ArrowArray* // STRING VIEW return scanArrowArrayBLOBView(array, outputVector, mask, srcOffset, dstOffset, count); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case 'd': { switch (outputVector.dataType.getPhysicalType()) { @@ -463,7 +463,7 @@ void ArrowConverter::fromArrowArray(const ArrowSchema* schema, const ArrowArray* return scanArrowArrayFixedSizePrimitive(array, outputVector, mask, srcOffset, dstOffset, count); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } case 'w': @@ -485,7 +485,7 @@ void ArrowConverter::fromArrowArray(const ArrowSchema* schema, const ArrowArray* } case 't': // TODO pure time type - KU_UNREACHABLE; + RYU_UNREACHABLE; case 's': // TIMESTAMP return scanArrowArrayFixedSizePrimitive(array, outputVector, mask, srcOffset, @@ -507,7 +507,7 @@ void ArrowConverter::fromArrowArray(const ArrowSchema* schema, const ArrowArray* return scanArrowArrayDurationScaledDown(array, outputVector, mask, 1000, srcOffset, dstOffset, count); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case 'i': // INTERVAL @@ -522,10 +522,10 @@ void ArrowConverter::fromArrowArray(const ArrowSchema* schema, const ArrowArray* return scanArrowArrayMonthDayNanoInterval(array, outputVector, mask, srcOffset, dstOffset, count); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case '+': switch (arrowType[1]) { @@ -546,7 +546,7 @@ void ArrowConverter::fromArrowArray(const ArrowSchema* schema, const ArrowArray* RUNTIME_CHECK({ auto arrowNumElements = std::stoul(arrowType + 3); auto outputNumElements = ArrayType::getNumElements(outputVector.dataType); - KU_ASSERT(arrowNumElements == outputNumElements); + RYU_ASSERT(arrowNumElements == outputNumElements); }); return scanArrowArrayFixedList(schema, array, outputVector, mask, srcOffset, dstOffset, count); @@ -579,13 +579,13 @@ void ArrowConverter::fromArrowArray(const ArrowSchema* schema, const ArrowArray* dstOffset, count); // LONG LIST VIEW default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/arrow/arrow_null_mask_tree.cpp b/src/common/arrow/arrow_null_mask_tree.cpp index 43ddf810c2..c12d16c034 100644 --- a/src/common/arrow/arrow_null_mask_tree.cpp +++ b/src/common/arrow/arrow_null_mask_tree.cpp @@ -210,11 +210,11 @@ ArrowNullMaskTree::ArrowNullMaskTree(const ArrowSchema* schema, const ArrowArray } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/arrow/arrow_row_batch.cpp b/src/common/arrow/arrow_row_batch.cpp index 997eea6e9b..4e8f31bc26 100644 --- a/src/common/arrow/arrow_row_batch.cpp +++ b/src/common/arrow/arrow_row_batch.cpp @@ -77,7 +77,7 @@ static uint64_t getArrowMainBufferSize(const LogicalType& type, uint64_t capacit case LogicalTypeID::REL: return 0; // no main buffer default: - KU_UNREACHABLE; // should enumerate all types. + RYU_UNREACHABLE; // should enumerate all types. } } @@ -407,7 +407,7 @@ void ArrowRowBatch::templateCopyNonNullValue(ArrowVector* fallbackExtensionTypes); } } - KU_UNREACHABLE; // We should always be able to find a matching type + RYU_UNREACHABLE; // We should always be able to find a matching type } template<> @@ -554,7 +554,7 @@ void ArrowRowBatch::copyNonNullValue(ArrowVector* vector, const Value& value, st templateCopyNonNullValue(vector, value, pos, fallbackExtensionTypes); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -713,7 +713,7 @@ void ArrowRowBatch::copyNullValue(ArrowVector* vector, const Value& value, std:: templateCopyNullValue(vector, pos); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -984,7 +984,7 @@ ArrowArray* ArrowRowBatch::convertVectorToArray(ArrowVector& vector, const Logic return templateCreateArray(vector, type, fallbackExtensionTypes); } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/common/arrow/arrow_type.cpp b/src/common/arrow/arrow_type.cpp index d46afa31e8..c12518ea9a 100644 --- a/src/common/arrow/arrow_type.cpp +++ b/src/common/arrow/arrow_type.cpp @@ -56,7 +56,7 @@ LogicalType ArrowConverter::fromArrowSchema(const ArrowSchema* schema) { case 'u': return LogicalType(LogicalTypeID::STRING); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case 'd': { @@ -91,7 +91,7 @@ LogicalType ArrowConverter::fromArrowSchema(const ArrowSchema* schema) { case 'n': return LogicalType(LogicalTypeID::TIMESTAMP_NS); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case 'D': // duration @@ -99,10 +99,10 @@ LogicalType ArrowConverter::fromArrowSchema(const ArrowSchema* schema) { // interval return LogicalType(LogicalTypeID::INTERVAL); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case '+': - KU_ASSERT(schema->n_children > 0); + RYU_ASSERT(schema->n_children > 0); switch (arrowType[1]) { // complex types need a complementary ExtraTypeInfo object case 'l': @@ -133,16 +133,16 @@ LogicalType ArrowConverter::fromArrowSchema(const ArrowSchema* schema) { case 'L': return LogicalType::LIST(LogicalType(fromArrowSchema(schema->children[0]))); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case 'r': // logical type corresponds to second child return fromArrowSchema(schema->children[1]); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } // refer to arrow_converted.cpp:65 } diff --git a/src/common/copier_config/csv_reader_config.cpp b/src/common/copier_config/csv_reader_config.cpp index ad10fa46b2..98576081bc 100644 --- a/src/common/copier_config/csv_reader_config.cpp +++ b/src/common/copier_config/csv_reader_config.cpp @@ -35,7 +35,7 @@ static void bindBoolParsingOption(CSVReaderConfig& config, const std::string& op } else if (optionName == "AUTODETECT" || optionName == "AUTO_DETECT") { config.option.autoDetection = optionValue; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -52,7 +52,7 @@ static void bindStringParsingOption(CSVReaderConfig& config, const std::string& config.option.quoteChar = parsingOptionValue; config.option.setQuote = true; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -71,7 +71,7 @@ static void bindIntParsingOption(CSVReaderConfig& config, const std::string& opt } config.option.sampleSize = optionValue; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -80,7 +80,7 @@ static void bindListParsingOption(CSVReaderConfig& config, const std::string& op if (optionName == "NULL_STRINGS") { config.option.nullStrings = optionValue; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/copier_config/reader_config.cpp b/src/common/copier_config/reader_config.cpp index 75fa333c03..1ad6b36eb2 100644 --- a/src/common/copier_config/reader_config.cpp +++ b/src/common/copier_config/reader_config.cpp @@ -33,7 +33,7 @@ std::string FileTypeUtils::toString(FileType fileType) { return "NPY"; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/common/data_chunk/data_chunk.cpp b/src/common/data_chunk/data_chunk.cpp index 430608acbe..8dfc995119 100644 --- a/src/common/data_chunk/data_chunk.cpp +++ b/src/common/data_chunk/data_chunk.cpp @@ -5,7 +5,7 @@ namespace common { void DataChunk::insert(uint32_t pos, std::shared_ptr valueVector) { valueVector->setState(state); - KU_ASSERT(valueVectors.size() > pos); + RYU_ASSERT(valueVectors.size() > pos); valueVectors[pos] = std::move(valueVector); } diff --git a/src/common/data_chunk/sel_vector.cpp b/src/common/data_chunk/sel_vector.cpp index 637d118931..085e67ef59 100644 --- a/src/common/data_chunk/sel_vector.cpp +++ b/src/common/data_chunk/sel_vector.cpp @@ -29,7 +29,7 @@ void SelectionVector::setToUnfiltered() { state = State::STATIC; } void SelectionVector::setToUnfiltered(sel_t size) { - KU_ASSERT(size <= capacity); + RYU_ASSERT(size <= capacity); selectedPositions = INCREMENTAL_SELECTED_POS.data(); selectedSize = size; state = State::STATIC; diff --git a/src/common/enums/accumulate_type.cpp b/src/common/enums/accumulate_type.cpp index e1c6e0c9c9..ac915bcd74 100644 --- a/src/common/enums/accumulate_type.cpp +++ b/src/common/enums/accumulate_type.cpp @@ -14,7 +14,7 @@ std::string AccumulateTypeUtil::toString(AccumulateType type) { return "OPTIONAL"; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/conflict_action.cpp b/src/common/enums/conflict_action.cpp index f16d50135c..a029cd7621 100644 --- a/src/common/enums/conflict_action.cpp +++ b/src/common/enums/conflict_action.cpp @@ -14,7 +14,7 @@ std::string ConflictActionUtil::toString(ConflictAction action) { return "ON_CONFLICT_DO_NOTHING"; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/drop_type.cpp b/src/common/enums/drop_type.cpp index 149d155ce7..7f3c56a87f 100644 --- a/src/common/enums/drop_type.cpp +++ b/src/common/enums/drop_type.cpp @@ -12,7 +12,7 @@ std::string DropTypeUtils::toString(DropType type) { case DropType::SEQUENCE: return "Sequence"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/extend_direction_util.cpp b/src/common/enums/extend_direction_util.cpp index 80858598a5..39335eea2e 100644 --- a/src/common/enums/extend_direction_util.cpp +++ b/src/common/enums/extend_direction_util.cpp @@ -28,7 +28,7 @@ std::string ExtendDirectionUtil::toString(ExtendDirection direction) { case ExtendDirection::BOTH: return "both"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/path_semantic.cpp b/src/common/enums/path_semantic.cpp index 48317cd142..4b0ea01763 100644 --- a/src/common/enums/path_semantic.cpp +++ b/src/common/enums/path_semantic.cpp @@ -32,7 +32,7 @@ std::string PathSemanticUtils::toString(PathSemantic semantic) { case PathSemantic::ACYCLIC: return "ACYCLIC"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/query_rel_type.cpp b/src/common/enums/query_rel_type.cpp index 89406db488..2c3ff2b9a0 100644 --- a/src/common/enums/query_rel_type.cpp +++ b/src/common/enums/query_rel_type.cpp @@ -21,7 +21,7 @@ PathSemantic QueryRelTypeUtils::getPathSemantic(QueryRelType queryRelType) { case QueryRelType::ALL_WEIGHTED_SHORTEST: return PathSemantic::ACYCLIC; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -45,7 +45,7 @@ std::unique_ptr QueryRelTypeUtils::getFunction(QueryRelTy return AllWeightedSPPathsFunction::getAlgorithm(); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/rel_direction.cpp b/src/common/enums/rel_direction.cpp index c18a0d9724..d83cce50c9 100644 --- a/src/common/enums/rel_direction.cpp +++ b/src/common/enums/rel_direction.cpp @@ -24,7 +24,7 @@ idx_t RelDirectionUtils::relDirectionToKeyIdx(RelDataDirection direction) { case RelDataDirection::BWD: return 1; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -36,7 +36,7 @@ table_id_t RelDirectionUtils::getNbrTableID(RelDataDirection direction, table_id case RelDataDirection::BWD: return srcTableID; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/rel_multiplicity.cpp b/src/common/enums/rel_multiplicity.cpp index 66925fa10e..099c5ac91a 100644 --- a/src/common/enums/rel_multiplicity.cpp +++ b/src/common/enums/rel_multiplicity.cpp @@ -35,7 +35,7 @@ std::string RelMultiplicityUtils::toString(RelMultiplicity multiplicity) { case RelMultiplicity::MANY: return "MANY"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/scan_source_type.cpp b/src/common/enums/scan_source_type.cpp index 5cac7516aa..7f6f2011b4 100644 --- a/src/common/enums/scan_source_type.cpp +++ b/src/common/enums/scan_source_type.cpp @@ -20,7 +20,7 @@ std::string ScanSourceTypeUtils::toString(ScanSourceType type) { return "QUERY"; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/table_type.cpp b/src/common/enums/table_type.cpp index 4776a2153f..55512ab8ba 100644 --- a/src/common/enums/table_type.cpp +++ b/src/common/enums/table_type.cpp @@ -20,7 +20,7 @@ std::string TableTypeUtils::toString(TableType tableType) { return "ATTACHED"; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/enums/transaction_action.cpp b/src/common/enums/transaction_action.cpp index 985216d8e4..ad8476f08a 100644 --- a/src/common/enums/transaction_action.cpp +++ b/src/common/enums/transaction_action.cpp @@ -23,7 +23,7 @@ std::string TransactionActionUtils::toString(TransactionAction action) { return "CHECKPOINT"; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/expression_type.cpp b/src/common/expression_type.cpp index 4bd77abebf..c814bcf5f7 100644 --- a/src/common/expression_type.cpp +++ b/src/common/expression_type.cpp @@ -34,7 +34,7 @@ bool ExpressionTypeUtil::isNullOperator(ExpressionType type) { } ExpressionType ExpressionTypeUtil::reverseComparisonDirection(ExpressionType type) { - KU_ASSERT(isComparison(type)); + RYU_ASSERT(isComparison(type)); switch (type) { case ExpressionType::GREATER_THAN: return ExpressionType::LESS_THAN; @@ -103,7 +103,7 @@ std::string ExpressionTypeUtil::toString(ExpressionType type) { case ExpressionType::LAMBDA: return "LAMBDA"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/file_system/file_system.cpp b/src/common/file_system/file_system.cpp index 7d41f9b1f6..78a666fa79 100644 --- a/src/common/file_system/file_system.cpp +++ b/src/common/file_system/file_system.cpp @@ -6,23 +6,23 @@ namespace ryu { namespace common { void FileSystem::overwriteFile(const std::string& /*from*/, const std::string& /*to*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void FileSystem::copyFile(const std::string& /*from*/, const std::string& /*to*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void FileSystem::createDir(const std::string& /*dir*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void FileSystem::removeFileIfExists(const std::string&, const main::ClientContext* /*context*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } bool FileSystem::fileOrPathExists(const std::string& /*path*/, main::ClientContext* /*context*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } std::string FileSystem::expandPath(main::ClientContext* /*context*/, @@ -52,11 +52,11 @@ std::string FileSystem::getFileName(const std::filesystem::path& path) { void FileSystem::writeFile(FileInfo& /*fileInfo*/, const uint8_t* /*buffer*/, uint64_t /*numBytes*/, uint64_t /*offset*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void FileSystem::truncate(FileInfo& /*fileInfo*/, uint64_t /*size*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void FileSystem::reset(FileInfo& fileInfo) { diff --git a/src/common/file_system/gzip_file_system.cpp b/src/common/file_system/gzip_file_system.cpp index 8a6cece69d..4d16405fa2 100644 --- a/src/common/file_system/gzip_file_system.cpp +++ b/src/common/file_system/gzip_file_system.cpp @@ -101,7 +101,7 @@ bool MiniZStreamWrapper::read(StreamData& sd) { if (gzipHdr[3] & GZipFileSystem::GZIP_FLAG_EXTRA) { auto xlen = (uint8_t)*bodyPtr | (uint8_t) * (bodyPtr + 1) << 8; bodyPtr += xlen + 2; - KU_ASSERT((common::idx_t)(GZipFileSystem::GZIP_FOOTER_SIZE + + RYU_ASSERT((common::idx_t)(GZipFileSystem::GZIP_FOOTER_SIZE + GZipFileSystem::GZIP_HEADER_MINSIZE + 2 + xlen) < GZipFileSystem::GZIP_HEADER_MAXSIZE); } @@ -111,7 +111,7 @@ bool MiniZStreamWrapper::read(StreamData& sd) { c = *bodyPtr; bodyPtr++; } while (c != '\0' && bodyPtr < sd.inputBufEnd); - KU_ASSERT(bodyPtr - sd.inputBufStart < GZipFileSystem::GZIP_HEADER_MAXSIZE); + RYU_ASSERT(bodyPtr - sd.inputBufStart < GZipFileSystem::GZIP_HEADER_MAXSIZE); } sd.inputBufStart = bodyPtr; if (sd.inputBufEnd - sd.inputBufStart < 1) { @@ -141,7 +141,7 @@ bool MiniZStreamWrapper::read(StreamData& sd) { sd.inputBufStart = (uint8_t*)mzStreamPtr->next_in; sd.inputBufEnd = sd.inputBufStart + mzStreamPtr->avail_in; sd.outputBufEnd = (uint8_t*)mzStreamPtr->next_out; - KU_ASSERT(sd.outputBufEnd + mzStreamPtr->avail_out == sd.outputBuf.get() + sd.outputBufSize); + RYU_ASSERT(sd.outputBufEnd + mzStreamPtr->avail_out == sd.outputBuf.get() + sd.outputBufSize); if (ret == miniz::MZ_STREAM_END) { sd.refresh = true; diff --git a/src/common/file_system/local_file_system.cpp b/src/common/file_system/local_file_system.cpp index 0b40eba6b8..32f7bc256a 100644 --- a/src/common/file_system/local_file_system.cpp +++ b/src/common/file_system/local_file_system.cpp @@ -43,15 +43,15 @@ LocalFileInfo::~LocalFileInfo() { static void validateFileFlags(uint8_t flags) { const bool isRead = flags & FileFlags::READ_ONLY; const bool isWrite = flags & FileFlags::WRITE; - KU_UNUSED(isRead); - KU_UNUSED(isWrite); + RYU_UNUSED(isRead); + RYU_UNUSED(isWrite); // Require either READ or WRITE (or both). - KU_ASSERT(isRead || isWrite); + RYU_ASSERT(isRead || isWrite); // CREATE flags require writing. - KU_ASSERT(isWrite || !(flags & FileFlags::CREATE_IF_NOT_EXISTS)); - KU_ASSERT(isWrite || !(flags & FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS)); + RYU_ASSERT(isWrite || !(flags & FileFlags::CREATE_IF_NOT_EXISTS)); + RYU_ASSERT(isWrite || !(flags & FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS)); // CREATE_IF_NOT_EXISTS and CREATE_AND_TRUNCATE_IF_EXISTS flags cannot be combined. - KU_ASSERT(!(flags & FileFlags::CREATE_IF_NOT_EXISTS && + RYU_ASSERT(!(flags & FileFlags::CREATE_IF_NOT_EXISTS && flags & FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS)); } @@ -76,7 +76,7 @@ std::unique_ptr LocalFileSystem::openFile(const std::string& path, Fil // LCOV_EXCL_STOP } if (writeMode) { - KU_ASSERT(fileFlags & FileFlags::WRITE); + RYU_ASSERT(fileFlags & FileFlags::WRITE); if (fileFlags & FileFlags::CREATE_IF_NOT_EXISTS) { openFlags |= O_CREAT; } else if (fileFlags & FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS) { @@ -358,7 +358,7 @@ bool LocalFileSystem::isLocalPath(const std::string& path) { void LocalFileSystem::readFromFile(FileInfo& fileInfo, void* buffer, uint64_t numBytes, uint64_t position) const { auto localFileInfo = fileInfo.constPtrCast(); - KU_ASSERT(localFileInfo->getFileSize() >= position + numBytes); + RYU_ASSERT(localFileInfo->getFileSize() >= position + numBytes); #if defined(_WIN32) DWORD numBytesRead; OVERLAPPED overlapped{0, 0, 0, 0}; @@ -543,7 +543,7 @@ uint64_t LocalFileSystem::getFileSize(const FileInfo& fileInfo) const { throw IOException(stringFormat("Cannot read size of file. path: {} - Error {}: {}", fileInfo.path, errno, posixErrMessage())); } - KU_ASSERT(s.st_size >= 0); + RYU_ASSERT(s.st_size >= 0); return s.st_size; #endif } diff --git a/src/common/file_system/virtual_file_system.cpp b/src/common/file_system/virtual_file_system.cpp index 3e14dfa390..e6dc7dd291 100644 --- a/src/common/file_system/virtual_file_system.cpp +++ b/src/common/file_system/virtual_file_system.cpp @@ -79,16 +79,16 @@ std::string VirtualFileSystem::expandPath(main::ClientContext* context, void VirtualFileSystem::readFromFile(FileInfo& /*fileInfo*/, void* /*buffer*/, uint64_t /*numBytes*/, uint64_t /*position*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } int64_t VirtualFileSystem::readFile(FileInfo& /*fileInfo*/, void* /*buf*/, size_t /*nbyte*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void VirtualFileSystem::writeFile(FileInfo& /*fileInfo*/, const uint8_t* /*buffer*/, uint64_t /*numBytes*/, uint64_t /*offset*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void VirtualFileSystem::syncFile(const FileInfo& fileInfo) const { @@ -111,15 +111,15 @@ function::TableFunction VirtualFileSystem::getHandleFunction(const std::string& } int64_t VirtualFileSystem::seek(FileInfo& /*fileInfo*/, uint64_t /*offset*/, int /*whence*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void VirtualFileSystem::truncate(FileInfo& /*fileInfo*/, uint64_t /*size*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } uint64_t VirtualFileSystem::getFileSize(const FileInfo& /*fileInfo*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } FileSystem* VirtualFileSystem::findFileSystem(const std::string& path) const { diff --git a/src/common/null_mask.cpp b/src/common/null_mask.cpp index f681c472fd..c4306ec422 100644 --- a/src/common/null_mask.cpp +++ b/src/common/null_mask.cpp @@ -144,7 +144,7 @@ void NullMask::resize(uint64_t capacity) { bool NullMask::copyFromNullBits(const uint64_t* srcNullEntries, uint64_t srcOffset, uint64_t dstOffset, uint64_t numBitsToCopy, bool invert) { - KU_ASSERT(dstOffset + numBitsToCopy <= getNumNullBits(data)); + RYU_ASSERT(dstOffset + numBitsToCopy <= getNumNullBits(data)); if (copyNullMask(srcNullEntries, srcOffset, this->data.data(), dstOffset, numBitsToCopy, invert)) { this->mayContainNulls = true; @@ -157,7 +157,7 @@ void NullMask::setNullFromRange(uint64_t offset, uint64_t numBitsToSet, bool isN if (isNull) { this->mayContainNulls = true; } - KU_ASSERT(offset + numBitsToSet <= getNumNullBits(data)); + RYU_ASSERT(offset + numBitsToSet <= getNumNullBits(data)); setNullRange(data.data(), offset, numBitsToSet, isNull); } @@ -207,7 +207,7 @@ void NullMask::setNullRange(uint64_t* nullEntries, uint64_t offset, uint64_t num } void NullMask::operator|=(const NullMask& other) { - KU_ASSERT(other.data.size() == data.size()); + RYU_ASSERT(other.data.size() == data.size()); for (size_t i = 0; i < data.size(); i++) { data[i] |= other.getData()[i]; } diff --git a/src/common/serializer/buffered_file.cpp b/src/common/serializer/buffered_file.cpp index 6af8b5e8be..36e0d82aae 100644 --- a/src/common/serializer/buffered_file.cpp +++ b/src/common/serializer/buffered_file.cpp @@ -27,7 +27,7 @@ void BufferedFileWriter::write(const uint8_t* data, uint64_t size) { fileOffset += size; return; } - KU_ASSERT(size <= BUFFER_SIZE); + RYU_ASSERT(size <= BUFFER_SIZE); if (bufferOffset + size <= BUFFER_SIZE) { memcpy(&buffer[bufferOffset], data, size); bufferOffset += size; diff --git a/src/common/serializer/deserializer.cpp b/src/common/serializer/deserializer.cpp index 6d19ad6e78..f12f91fc26 100644 --- a/src/common/serializer/deserializer.cpp +++ b/src/common/serializer/deserializer.cpp @@ -14,11 +14,11 @@ void Deserializer::deserializeValue(std::string& value) { void Deserializer::validateDebuggingInfo(std::string& value, const std::string& expectedVal) { #if defined(RYU_DESER_DEBUG) && (defined(RYU_RUNTIME_CHECKS) || !defined(NDEBUG)) deserializeValue(value); - KU_ASSERT(value == expectedVal); + RYU_ASSERT(value == expectedVal); #endif // DO NOTHING - KU_UNUSED(value); - KU_UNUSED(expectedVal); + RYU_UNUSED(value); + RYU_UNUSED(expectedVal); } } // namespace common diff --git a/src/common/serializer/in_mem_file_writer.cpp b/src/common/serializer/in_mem_file_writer.cpp index f547303ee1..c9db30618e 100644 --- a/src/common/serializer/in_mem_file_writer.cpp +++ b/src/common/serializer/in_mem_file_writer.cpp @@ -40,7 +40,7 @@ storage::PageRange InMemFileWriter::flush(storage::PageAllocator& pageAllocator, void InMemFileWriter::flush(storage::PageRange allocatedPageRange, storage::FileHandle* fileHandle, storage::ShadowFile& shadowFile) const { auto numPagesToWrite = getNumPagesToFlush(); - KU_ASSERT(allocatedPageRange.numPages >= numPagesToWrite); + RYU_ASSERT(allocatedPageRange.numPages >= numPagesToWrite); auto numPagesBeforeAllocate = allocatedPageRange.startPageIdx; for (auto i = 0u; i < numPagesToWrite; i++) { auto pageIdx = allocatedPageRange.startPageIdx + i; diff --git a/src/common/serializer/serializer.cpp b/src/common/serializer/serializer.cpp index 71fe505715..30a7c4594d 100644 --- a/src/common/serializer/serializer.cpp +++ b/src/common/serializer/serializer.cpp @@ -17,7 +17,7 @@ void Serializer::writeDebuggingInfo(const std::string& value) { serializeValue(value); #endif // DO NOTHING - KU_UNUSED(value); + RYU_UNUSED(value); } } // namespace common diff --git a/src/common/task_system/task_scheduler.cpp b/src/common/task_system/task_scheduler.cpp index 2dbff7d7d7..e1c787a354 100644 --- a/src/common/task_system/task_scheduler.cpp +++ b/src/common/task_system/task_scheduler.cpp @@ -103,7 +103,7 @@ void TaskScheduler::runWorkerThread() { qos_class_t qosClass = (qos_class_t)threadQos; if (qosClass != QOS_CLASS_DEFAULT && qosClass != QOS_CLASS_UNSPECIFIED) { auto pthreadQosStatus = pthread_set_qos_class_self_np(qosClass, 0); - KU_UNUSED(pthreadQosStatus); + RYU_UNUSED(pthreadQosStatus); } #endif std::unique_lock lck{taskSchedulerMtx, std::defer_lock}; diff --git a/src/common/task_system/terminal_progress_bar_display.cpp b/src/common/task_system/terminal_progress_bar_display.cpp index 1def388139..c3b17b087b 100644 --- a/src/common/task_system/terminal_progress_bar_display.cpp +++ b/src/common/task_system/terminal_progress_bar_display.cpp @@ -7,7 +7,7 @@ namespace common { void TerminalProgressBarDisplay::updateProgress(uint64_t /*queryID*/, double newPipelineProgress, uint32_t newNumPipelinesFinished) { - KU_ASSERT(0.0 <= newPipelineProgress && newPipelineProgress <= 1.0); + RYU_ASSERT(0.0 <= newPipelineProgress && newPipelineProgress <= 1.0); // There can still be data races as the comparison + update of cur/old progress is not done // atomically diff --git a/src/common/type_utils.cpp b/src/common/type_utils.cpp index a9b46db2ac..eec12534d2 100644 --- a/src/common/type_utils.cpp +++ b/src/common/type_utils.cpp @@ -55,7 +55,7 @@ std::string TypeUtils::entryToString(const LogicalType& dataType, const uint8_t* DecimalType::getScale(dataType)); default: // decimals should always be backed by one of these four - KU_UNREACHABLE; + RYU_UNREACHABLE; } case LogicalTypeID::DATE: return TypeUtils::toString(*reinterpret_cast(value)); diff --git a/src/common/types/date_t.cpp b/src/common/types/date_t.cpp index 47dbcb54e1..ec0bac6483 100644 --- a/src/common/types/date_t.cpp +++ b/src/common/types/date_t.cpp @@ -199,10 +199,10 @@ void Date::extractYearOffset(int32_t& n, int32_t& year, int32_t& year_offset) { // offset until we find our year while (n < Date::CUMULATIVE_YEAR_DAYS[year_offset]) { year_offset--; - KU_ASSERT(year_offset >= 0); + RYU_ASSERT(year_offset >= 0); } year += year_offset; - KU_ASSERT(n >= Date::CUMULATIVE_YEAR_DAYS[year_offset]); + RYU_ASSERT(n >= Date::CUMULATIVE_YEAR_DAYS[year_offset]); } void Date::convert(date_t date, int32_t& out_year, int32_t& out_month, int32_t& out_day) { @@ -211,7 +211,7 @@ void Date::convert(date_t date, int32_t& out_year, int32_t& out_month, int32_t& Date::extractYearOffset(n, out_year, year_offset); out_day = n - Date::CUMULATIVE_YEAR_DAYS[year_offset]; - KU_ASSERT(out_day >= 0 && out_day <= 365); + RYU_ASSERT(out_day >= 0 && out_day <= 365); bool is_leap_year = (Date::CUMULATIVE_YEAR_DAYS[year_offset + 1] - Date::CUMULATIVE_YEAR_DAYS[year_offset]) == 366; @@ -223,10 +223,10 @@ void Date::convert(date_t date, int32_t& out_year, int32_t& out_month, int32_t& out_day -= Date::CUMULATIVE_DAYS[out_month - 1]; } out_day++; - KU_ASSERT(out_day > 0 && out_day <= (is_leap_year ? Date::LEAP_DAYS[out_month] : + RYU_ASSERT(out_day > 0 && out_day <= (is_leap_year ? Date::LEAP_DAYS[out_month] : Date::NORMAL_DAYS[out_month])); - KU_ASSERT(out_month > 0 && out_month <= 12); - KU_ASSERT(Date::isValid(out_year, out_month, out_day)); + RYU_ASSERT(out_month > 0 && out_month <= 12); + RYU_ASSERT(Date::isValid(out_year, out_month, out_day)); } date_t Date::fromDate(int32_t year, int32_t month, int32_t day) { @@ -381,7 +381,7 @@ bool Date::isValid(int32_t year, int32_t month, int32_t day) { } int32_t Date::monthDays(int32_t year, int32_t month) { - KU_ASSERT(month >= 1 && month <= 12); + RYU_ASSERT(month >= 1 && month <= 12); return Date::isLeapYear(year) ? Date::LEAP_DAYS[month] : Date::NORMAL_DAYS[month]; } diff --git a/src/common/types/dtime_t.cpp b/src/common/types/dtime_t.cpp index e1e38fb23a..71c2049309 100644 --- a/src/common/types/dtime_t.cpp +++ b/src/common/types/dtime_t.cpp @@ -215,7 +215,7 @@ void Time::convert(dtime_t dtime, int32_t& hour, int32_t& min, int32_t& sec, int sec = int32_t(time / Interval::MICROS_PER_SEC); time -= int64_t(sec) * Interval::MICROS_PER_SEC; micros = int32_t(time); - KU_ASSERT(Time::isValid(hour, min, sec, micros)); + RYU_ASSERT(Time::isValid(hour, min, sec, micros)); } } // namespace common diff --git a/src/common/types/interval_t.cpp b/src/common/types/interval_t.cpp index fd4373453c..9cce6e8d6e 100644 --- a/src/common/types/interval_t.cpp +++ b/src/common/types/interval_t.cpp @@ -449,7 +449,7 @@ int32_t Interval::getIntervalPart(DatePartSpecifier specifier, interval_t interv case DatePartSpecifier::HOUR: return interval.micros / Interval::MICROS_PER_HOUR; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/types/types.cpp b/src/common/types/types.cpp index bc2625ff89..96934df50c 100644 --- a/src/common/types/types.cpp +++ b/src/common/types/types.cpp @@ -100,38 +100,38 @@ void UDTTypeInfo::serializeInternal(Serializer& serializer) const { } uint32_t DecimalType::getPrecision(const LogicalType& type) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::DECIMAL); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::DECIMAL); auto decimalTypeInfo = type.extraTypeInfo->constPtrCast(); return decimalTypeInfo->getPrecision(); } uint32_t DecimalType::getScale(const LogicalType& type) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::DECIMAL); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::DECIMAL); auto decimalTypeInfo = type.extraTypeInfo->constPtrCast(); return decimalTypeInfo->getScale(); } const LogicalType& ListType::getChildType(const ryu::common::LogicalType& type) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::LIST || + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::LIST || type.getPhysicalType() == PhysicalTypeID::ARRAY); auto listTypeInfo = type.extraTypeInfo->constPtrCast(); return listTypeInfo->getChildType(); } const LogicalType& ArrayType::getChildType(const LogicalType& type) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::ARRAY); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::ARRAY); auto arrayTypeInfo = type.extraTypeInfo->constPtrCast(); return arrayTypeInfo->getChildType(); } uint64_t ArrayType::getNumElements(const LogicalType& type) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::ARRAY); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::ARRAY); auto arrayTypeInfo = type.extraTypeInfo->constPtrCast(); return arrayTypeInfo->getNumElements(); } std::vector StructType::getFieldTypes(const LogicalType& type) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); auto structTypeInfo = type.extraTypeInfo->constPtrCast(); return structTypeInfo->getChildrenTypes(); } @@ -145,53 +145,53 @@ const LogicalType& StructType::getFieldType(const LogicalType& type, const std:: } std::vector StructType::getFieldNames(const LogicalType& type) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); auto structTypeInfo = type.extraTypeInfo->constPtrCast(); return structTypeInfo->getChildrenNames(); } uint64_t StructType::getNumFields(const LogicalType& type) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); return getFields(type).size(); } const std::vector& StructType::getFields(const LogicalType& type) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); auto structTypeInfo = type.extraTypeInfo->constPtrCast(); return structTypeInfo->getStructFields(); } bool StructType::hasField(const LogicalType& type, const std::string& key) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); auto structTypeInfo = type.extraTypeInfo->constPtrCast(); return structTypeInfo->hasField(key); } const StructField& StructType::getField(const LogicalType& type, struct_field_idx_t idx) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); auto structTypeInfo = type.extraTypeInfo->constPtrCast(); return structTypeInfo->getStructField(idx); } const StructField& StructType::getField(const LogicalType& type, const std::string& key) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); auto structTypeInfo = type.extraTypeInfo->constPtrCast(); return structTypeInfo->getStructField(key); } struct_field_idx_t StructType::getFieldIdx(const LogicalType& type, const std::string& key) { - KU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::STRUCT); auto structTypeInfo = type.extraTypeInfo->constPtrCast(); return structTypeInfo->getStructFieldIdx(key); } const LogicalType& MapType::getKeyType(const LogicalType& type) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::MAP); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::MAP); return *StructType::getFieldTypes(ListType::getChildType(type))[0]; } const LogicalType& MapType::getValueType(const LogicalType& type) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::MAP); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::MAP); return *StructType::getFieldTypes(ListType::getChildType(type))[1]; } @@ -200,32 +200,32 @@ union_field_idx_t UnionType::getInternalFieldIdx(union_field_idx_t idx) { } std::string UnionType::getFieldName(const LogicalType& type, union_field_idx_t idx) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); return StructType::getFieldNames(type)[getInternalFieldIdx(idx)]; } const LogicalType& UnionType::getFieldType(const LogicalType& type, union_field_idx_t idx) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); return StructType::getFieldType(type, getInternalFieldIdx(idx)); } const LogicalType& UnionType::getFieldType(const LogicalType& type, const std::string& key) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); return StructType::getFieldType(type, key); } uint64_t UnionType::getNumFields(const LogicalType& type) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); return StructType::getNumFields(type) - 1; } bool UnionType::hasField(const LogicalType& type, const std::string& key) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); return StructType::hasField(type, key); } union_field_idx_t UnionType::getFieldIdx(const LogicalType& type, const std::string& key) { - KU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(type.getLogicalTypeID() == LogicalTypeID::UNION); return StructType::getFieldIdx(type, key) - 1; // inverse of getInternalFieldIdx } @@ -277,7 +277,7 @@ std::string PhysicalTypeUtils::toString(PhysicalTypeID physicalType) { case PhysicalTypeID::ALP_EXCEPTION_DOUBLE: return "ALP_EXCEPTION_DOUBLE"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } // LCOV_EXCL_STOP } @@ -319,7 +319,7 @@ uint32_t PhysicalTypeUtils::getFixedTypeSize(PhysicalTypeID physicalType) { case PhysicalTypeID::ALP_EXCEPTION_DOUBLE: return storage::EncodeException::sizeInBytes(); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -671,7 +671,7 @@ std::string LogicalType::toString() const { case LogicalTypeID::SERIAL: return LogicalTypeUtils::toString(typeID); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -908,7 +908,7 @@ PhysicalTypeID LogicalType::getPhysicalType(LogicalTypeID typeID, return PhysicalTypeID::POINTER; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -1048,7 +1048,7 @@ std::string LogicalTypeUtils::toString(LogicalTypeID dataTypeID) { case LogicalTypeID::POINTER: return "POINTER"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } // LCOV_EXCL_STOP } @@ -1588,8 +1588,8 @@ static bool tryCombineUnionTypes(const LogicalType& left, const LogicalType& rig */ static LogicalTypeID joinToWiderType(const LogicalTypeID& left, const LogicalTypeID& right) { - KU_ASSERT(LogicalTypeUtils::isIntegral(left)); - KU_ASSERT(LogicalTypeUtils::isIntegral(right)); + RYU_ASSERT(LogicalTypeUtils::isIntegral(left)); + RYU_ASSERT(LogicalTypeUtils::isIntegral(right)); if (PhysicalTypeUtils::getFixedTypeSize(LogicalType::getPhysicalType(left)) > PhysicalTypeUtils::getFixedTypeSize(LogicalType::getPhysicalType(right))) { return left; diff --git a/src/common/types/uint128_t.cpp b/src/common/types/uint128_t.cpp index ffc6635c8a..2707fe6739 100644 --- a/src/common/types/uint128_t.cpp +++ b/src/common/types/uint128_t.cpp @@ -642,7 +642,7 @@ uint128_t::operator double() const { double result = NAN; [[maybe_unused]] bool success = UInt128_t::tryCast(*this, result); // casting to double should always succeed - KU_ASSERT(success); + RYU_ASSERT(success); return result; } @@ -650,7 +650,7 @@ uint128_t::operator float() const { float result = NAN; [[maybe_unused]] bool success = UInt128_t::tryCast(*this, result); // casting overly large values to float currently returns inf - KU_ASSERT(success); + RYU_ASSERT(success); return result; } diff --git a/src/common/types/value/value.cpp b/src/common/types/value/value.cpp index 252174a95c..dea275bd30 100644 --- a/src/common/types/value/value.cpp +++ b/src/common/types/value/value.cpp @@ -70,12 +70,12 @@ bool Value::operator==(const Value& rhs) const { return true; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } void Value::setDataType(const LogicalType& dataType_) { - KU_ASSERT(allowTypeChange()); + RYU_ASSERT(allowTypeChange()); dataType = dataType_.copy(); } @@ -197,7 +197,7 @@ Value Value::createDefaultValue(const LogicalType& dataType) { return createNullValue(); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -403,7 +403,7 @@ void Value::copyFromRowLayout(const uint8_t* value) { val.int128Val = (*(int128_t*)value); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; case LogicalTypeID::INTERVAL: { @@ -445,7 +445,7 @@ void Value::copyFromRowLayout(const uint8_t* value) { val.pointer = *((uint8_t**)value); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -507,7 +507,7 @@ void Value::copyFromColLayout(const uint8_t* value, ValueVector* vector) { val.uint128Val = *((uint128_t*)value); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -517,7 +517,7 @@ void Value::copyValueFrom(const Value& other) { return; } isNull_ = false; - KU_ASSERT(dataType == other.dataType); + RYU_ASSERT(dataType == other.dataType); switch (dataType.getPhysicalType()) { case PhysicalTypeID::BOOL: { val.booleanVal = other.val.booleanVal; @@ -578,7 +578,7 @@ void Value::copyValueFrom(const Value& other) { val.pointer = other.val.pointer; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -663,7 +663,7 @@ std::string Value::toString() const { return relToString(); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -837,11 +837,11 @@ void Value::serialize(Serializer& serializer) const { case PhysicalTypeID::ANY: { // We want to be able to ser/deser values that are meant to just be null if (!isNull_) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -911,11 +911,11 @@ std::unique_ptr Value::deserialize(Deserializer& deserializer) { case PhysicalTypeID::ANY: { // We want to be able to ser/deser values that are meant to just be null if (!val->isNull_) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return val; @@ -1050,7 +1050,7 @@ uint64_t Value::computeHash() const { } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return hashValue; @@ -1154,7 +1154,7 @@ std::string Value::decimalToString() const { return DecimalType::insertDecimalPoint(TypeUtils::toString(val.int128Val), DecimalType::getScale(dataType)); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/common/vector/auxiliary_buffer.cpp b/src/common/vector/auxiliary_buffer.cpp index a330cacc73..3c5526d3d8 100644 --- a/src/common/vector/auxiliary_buffer.cpp +++ b/src/common/vector/auxiliary_buffer.cpp @@ -44,7 +44,7 @@ void ListAuxiliaryBuffer::resize(uint64_t numValues) { bool needResizeDataVector = numValues > capacity; while (numValues > capacity) { capacity *= 2; - KU_ASSERT(capacity != 0); + RYU_ASSERT(capacity != 0); } if (needResizeDataVector) { resizeDataVector(dataVector.get()); diff --git a/src/common/vector/value_vector.cpp b/src/common/vector/value_vector.cpp index 7ecd201538..3010fd2bb7 100644 --- a/src/common/vector/value_vector.cpp +++ b/src/common/vector/value_vector.cpp @@ -130,7 +130,7 @@ void ValueVector::copyToRowData(uint32_t pos, uint8_t* rowData, void ValueVector::copyFromVectorData(uint8_t* dstData, const ValueVector* srcVector, const uint8_t* srcVectorData) { - KU_ASSERT(srcVector->dataType.getPhysicalType() == dataType.getPhysicalType()); + RYU_ASSERT(srcVector->dataType.getPhysicalType() == dataType.getPhysicalType()); switch (srcVector->dataType.getPhysicalType()) { case PhysicalTypeID::STRUCT: { StructVector::copyFromVectorData(this, dstData, srcVector, srcVectorData); @@ -236,7 +236,7 @@ void ValueVector::copyFromValue(uint64_t pos, const Value& value) { memcpy(dstValue, &value.val.uint128Val, numBytesPerValue); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -320,7 +320,7 @@ std::unique_ptr ValueVector::getAsValue(uint64_t pos) const { value->val.uint128Val = getValue(pos); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return value; @@ -408,7 +408,7 @@ std::unique_ptr ValueVector::deSerialize(Deserializer& deSer, sel_t numValues = 0; deSer.deserializeValue(numValues); result->state->getSelVectorUnsafe().setSelSize(numValues); - KU_ASSERT(result->state->getSelVector().isUnfiltered()); + RYU_ASSERT(result->state->getSelVector().isUnfiltered()); bool isNull = false; for (auto i = 0u; i < numValues; i++) { deSer.deserializeValue(isNull); @@ -464,7 +464,7 @@ void ValueVector::setNull(uint32_t pos, bool isNull) { } void StringVector::addString(ValueVector* vector, uint32_t vectorPos, ku_string_t& srcStr) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); auto stringBuffer = ku_dynamic_cast(vector->auxiliaryBuffer.get()); auto& dstStr = vector->getValue(vectorPos); if (ku_string_t::isShortString(srcStr.len)) { @@ -477,7 +477,7 @@ void StringVector::addString(ValueVector* vector, uint32_t vectorPos, ku_string_ void StringVector::addString(ValueVector* vector, uint32_t vectorPos, const char* srcStr, uint64_t length) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); auto stringBuffer = ku_dynamic_cast(vector->auxiliaryBuffer.get()); auto& dstStr = vector->getValue(vectorPos); if (ku_string_t::isShortString(length)) { @@ -493,7 +493,7 @@ void StringVector::addString(ValueVector* vector, uint32_t vectorPos, std::strin } ku_string_t& StringVector::reserveString(ValueVector* vector, uint32_t vectorPos, uint64_t length) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); auto stringBuffer = ku_dynamic_cast(vector->auxiliaryBuffer.get()); auto& dstStr = vector->getValue(vectorPos); dstStr.len = length; @@ -504,7 +504,7 @@ ku_string_t& StringVector::reserveString(ValueVector* vector, uint32_t vectorPos } void StringVector::reserveString(ValueVector* vector, ku_string_t& dstStr, uint64_t length) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); auto stringBuffer = ku_dynamic_cast(vector->auxiliaryBuffer.get()); dstStr.len = length; if (!ku_string_t::isShortString(length)) { @@ -513,7 +513,7 @@ void StringVector::reserveString(ValueVector* vector, ku_string_t& dstStr, uint6 } void StringVector::addString(ValueVector* vector, ku_string_t& dstStr, ku_string_t& srcStr) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); auto stringBuffer = ku_dynamic_cast(vector->auxiliaryBuffer.get()); if (ku_string_t::isShortString(srcStr.len)) { dstStr.setShortString(srcStr); @@ -525,7 +525,7 @@ void StringVector::addString(ValueVector* vector, ku_string_t& dstStr, ku_string void StringVector::addString(ValueVector* vector, ku_string_t& dstStr, const char* srcStr, uint64_t length) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); auto stringBuffer = ku_dynamic_cast(vector->auxiliaryBuffer.get()); if (ku_string_t::isShortString(length)) { dstStr.setShortString(srcStr, length); @@ -556,7 +556,7 @@ void StringVector::copyToRowData(const ValueVector* vector, uint32_t pos, uint8_ void ListVector::copyListEntryAndBufferMetaData(ValueVector& vector, const SelectionVector& selVector, const ValueVector& other, const SelectionVector& otherSelVector) { - KU_ASSERT(selVector.getSelSize() == otherSelVector.getSelSize()); + RYU_ASSERT(selVector.getSelSize() == otherSelVector.getSelSize()); // Copy list entries for (auto i = 0u; i < otherSelVector.getSelSize(); ++i) { auto pos = selVector[i]; @@ -574,7 +574,7 @@ void ListVector::copyListEntryAndBufferMetaData(ValueVector& vector, } void ListVector::copyFromRowData(ValueVector* vector, uint32_t pos, const uint8_t* rowData) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); auto& srcKuList = *(ku_list_t*)rowData; auto srcNullBytes = reinterpret_cast(srcKuList.overflowPtr); auto srcListValues = srcNullBytes + NullBuffer::getNumBytesForNullValues(srcKuList.size); @@ -652,7 +652,7 @@ void ListVector::sliceDataVector(ValueVector* vectorToSlice, uint64_t offset, ui } void StructVector::copyFromRowData(ValueVector* vector, uint32_t pos, const uint8_t* rowData) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRUCT); auto& structFields = getFieldVectors(vector); auto structNullBytes = rowData; auto structValues = structNullBytes + NullBuffer::getNumBytesForNullValues(structFields.size()); diff --git a/src/expression_evaluator/case_evaluator.cpp b/src/expression_evaluator/case_evaluator.cpp index c4f31ac007..a4ef36f9af 100644 --- a/src/expression_evaluator/case_evaluator.cpp +++ b/src/expression_evaluator/case_evaluator.cpp @@ -50,9 +50,9 @@ void CaseExpressionEvaluator::evaluate() { bool CaseExpressionEvaluator::selectInternal(SelectionVector& selVector) { evaluate(); - KU_ASSERT(resultVector->state->getSelVector().getSelSize() != 0); - KU_ASSERT(selVector.getSelSize() != 0); - KU_ASSERT(resultVector->state->getSelVector().getSelSize() == selVector.getSelSize()); + RYU_ASSERT(resultVector->state->getSelVector().getSelSize() != 0); + RYU_ASSERT(selVector.getSelSize() != 0); + RYU_ASSERT(resultVector->state->getSelVector().getSelSize() == selVector.getSelSize()); auto numSelectedValues = 0u; auto selectedPosBuffer = selVector.getMutableBuffer(); for (auto i = 0u; i < selVector.getSelSize(); ++i) { diff --git a/src/expression_evaluator/expression_evaluator_utils.cpp b/src/expression_evaluator/expression_evaluator_utils.cpp index edc914df2e..6ad1e8dda1 100644 --- a/src/expression_evaluator/expression_evaluator_utils.cpp +++ b/src/expression_evaluator/expression_evaluator_utils.cpp @@ -17,7 +17,7 @@ Value ExpressionEvaluatorUtils::evaluateConstantExpression( evaluator->init(*emptyResultSet, clientContext); evaluator->evaluate(); auto& selVector = evaluator->resultVector->state->getSelVector(); - KU_ASSERT(selVector.getSelSize() == 1); + RYU_ASSERT(selVector.getSelSize() == 1); return *evaluator->resultVector->getAsValue(selVector[0]); } diff --git a/src/expression_evaluator/expression_evaluator_visitor.cpp b/src/expression_evaluator/expression_evaluator_visitor.cpp index 5b4e40f878..076d14a7e8 100644 --- a/src/expression_evaluator/expression_evaluator_visitor.cpp +++ b/src/expression_evaluator/expression_evaluator_visitor.cpp @@ -32,7 +32,7 @@ void ExpressionEvaluatorVisitor::visitSwitch(ExpressionEvaluator* evaluator) { visitReference(evaluator); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/expression_evaluator/function_evaluator.cpp b/src/expression_evaluator/function_evaluator.cpp index 019e7ba497..a2f82a0f6c 100644 --- a/src/expression_evaluator/function_evaluator.cpp +++ b/src/expression_evaluator/function_evaluator.cpp @@ -33,7 +33,7 @@ void FunctionExpressionEvaluator::evaluate() { } void FunctionExpressionEvaluator::evaluate(common::sel_t count) { - KU_ASSERT(expression->constCast().getFunction().name == + RYU_ASSERT(expression->constCast().getFunction().name == NextValFunction::name); for (auto& child : children) { child->evaluate(count); @@ -50,7 +50,7 @@ bool FunctionExpressionEvaluator::selectInternal(SelectionVector& selVector) { // Temporary code path for function whose return type is BOOL but select interface is not // implemented (e.g. list_contains). We should remove this if statement eventually. if (function->selectFunc == nullptr) { - KU_ASSERT(resultVector->dataType.getLogicalTypeID() == LogicalTypeID::BOOL); + RYU_ASSERT(resultVector->dataType.getLogicalTypeID() == LogicalTypeID::BOOL); runExecFunc(); return updateSelectedPos(selVector); } diff --git a/src/expression_evaluator/lambda_evaluator.cpp b/src/expression_evaluator/lambda_evaluator.cpp index 5901e9f52d..4349565dd0 100644 --- a/src/expression_evaluator/lambda_evaluator.cpp +++ b/src/expression_evaluator/lambda_evaluator.cpp @@ -21,7 +21,7 @@ void ListLambdaEvaluator::init(const ResultSet& resultSet, ClientContext* client for (auto& child : children) { child->init(resultSet, clientContext); } - KU_ASSERT(children.size() == 1); + RYU_ASSERT(children.size() == 1); auto listInputVector = children[0]->resultVector.get(); // Find all param in lambda, e.g. find x in x->x+1 auto collector = LambdaParamEvaluatorCollector(); @@ -67,13 +67,13 @@ void ListLambdaEvaluator::evaluateInternal() { } void ListLambdaEvaluator::evaluate() { - KU_ASSERT(children.size() == 1); + RYU_ASSERT(children.size() == 1); children[0]->evaluate(); evaluateInternal(); } bool ListLambdaEvaluator::selectInternal(SelectionVector& selVector) { - KU_ASSERT(children.size() == 1); + RYU_ASSERT(children.size() == 1); children[0]->evaluate(); evaluateInternal(); return updateSelectedPos(selVector); diff --git a/src/expression_evaluator/literal_evaluator.cpp b/src/expression_evaluator/literal_evaluator.cpp index f481e99c33..59808a0e48 100644 --- a/src/expression_evaluator/literal_evaluator.cpp +++ b/src/expression_evaluator/literal_evaluator.cpp @@ -20,9 +20,9 @@ void LiteralExpressionEvaluator::evaluate(sel_t count) { } bool LiteralExpressionEvaluator::selectInternal(SelectionVector&) { - KU_ASSERT(resultVector->dataType.getLogicalTypeID() == LogicalTypeID::BOOL); + RYU_ASSERT(resultVector->dataType.getLogicalTypeID() == LogicalTypeID::BOOL); auto pos = resultVector->state->getSelVector()[0]; - KU_ASSERT(pos == 0u); + RYU_ASSERT(pos == 0u); return resultVector->getValue(pos) && (!resultVector->isNull(pos)); } diff --git a/src/expression_evaluator/path_evaluator.cpp b/src/expression_evaluator/path_evaluator.cpp index 11dc9524ba..69894758e3 100644 --- a/src/expression_evaluator/path_evaluator.cpp +++ b/src/expression_evaluator/path_evaluator.cpp @@ -73,7 +73,7 @@ void PathExpressionEvaluator::init(const processor::ResultSet& resultSet, pathExpression->getRelType(), vectors->relsDataInput); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } inputVectorsPerChild.push_back(std::move(vectors)); } @@ -197,7 +197,7 @@ uint64_t PathExpressionEvaluator::copyRels(sel_t resultPos) { void PathExpressionEvaluator::copyFieldVectors(offset_t inputVectorPos, const std::vector& inputFieldVectors, offset_t& resultVectorPos, const std::vector& resultFieldVectors) { - KU_ASSERT(resultFieldVectors.size() == inputFieldVectors.size()); + RYU_ASSERT(resultFieldVectors.size() == inputFieldVectors.size()); for (auto i = 0u; i < inputFieldVectors.size(); ++i) { auto inputFieldVector = inputFieldVectors[i]; auto resultFieldVector = resultFieldVectors[i]; @@ -206,7 +206,7 @@ void PathExpressionEvaluator::copyFieldVectors(offset_t inputVectorPos, continue; } resultFieldVector->setNull(resultVectorPos, false); - KU_ASSERT(inputFieldVector->dataType == resultFieldVector->dataType); + RYU_ASSERT(inputFieldVector->dataType == resultFieldVector->dataType); resultFieldVector->copyFromVectorData(resultVectorPos, inputFieldVector, inputVectorPos); } resultVectorPos++; diff --git a/src/expression_evaluator/pattern_evaluator.cpp b/src/expression_evaluator/pattern_evaluator.cpp index 875d84b47f..76fe5994dd 100644 --- a/src/expression_evaluator/pattern_evaluator.cpp +++ b/src/expression_evaluator/pattern_evaluator.cpp @@ -47,7 +47,7 @@ void PatternExpressionEvaluator::initFurther(const ResultSet&) { StructPackFunctions::compileFunc(nullptr, parameters, resultVector); const auto& dataType = expression->getDataType(); auto fieldIdx = StructType::getFieldIdx(dataType.copy(), InternalKeyword::ID); - KU_ASSERT(fieldIdx != INVALID_STRUCT_FIELD_IDX); + RYU_ASSERT(fieldIdx != INVALID_STRUCT_FIELD_IDX); idVector = StructVector::getFieldVector(resultVector.get(), fieldIdx).get(); } diff --git a/src/expression_evaluator/reference_evaluator.cpp b/src/expression_evaluator/reference_evaluator.cpp index f179676578..0073debbe7 100644 --- a/src/expression_evaluator/reference_evaluator.cpp +++ b/src/expression_evaluator/reference_evaluator.cpp @@ -7,7 +7,7 @@ namespace ryu { namespace evaluator { inline static bool isTrue(ValueVector& vector, uint64_t pos) { - KU_ASSERT(vector.dataType.getLogicalTypeID() == LogicalTypeID::BOOL); + RYU_ASSERT(vector.dataType.getLogicalTypeID() == LogicalTypeID::BOOL); return !vector.isNull(pos) && vector.getValue(pos); } diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index b394724420..c752f5c1ce 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -68,7 +68,7 @@ std::string ExtensionSourceUtils::toString(ExtensionSource source) { case ExtensionSource::STATIC_LINKED: return "STATIC LINK"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -139,7 +139,7 @@ std::string ExtensionUtils::appendLibSuffix(const std::string& libName) { } else if (os == "osx") { suffix = "dylib"; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } return common::stringFormat("{}.{}", libName, suffix); } @@ -194,13 +194,13 @@ ext_install_func_t ExtensionLibLoader::getInstallFunc() { } void ExtensionLibLoader::unload() { - KU_ASSERT(libHdl != nullptr); + RYU_ASSERT(libHdl != nullptr); dlclose(libHdl); libHdl = nullptr; } void* ExtensionLibLoader::getDynamicLibFunc(const std::string& funcName) { - KU_ASSERT(libHdl != nullptr); + RYU_ASSERT(libHdl != nullptr); auto sym = dlsym(libHdl, funcName.c_str()); if (sym == nullptr) { throw common::IOException( @@ -227,18 +227,18 @@ std::wstring utf8ToUnicode(const char* input) { } void* dlopen(const char* file, int /*mode*/) { - KU_ASSERT(file); + RYU_ASSERT(file); auto fpath = utf8ToUnicode(file); return (void*)LoadLibraryW(fpath.c_str()); } void* dlsym(void* handle, const char* name) { - KU_ASSERT(handle); + RYU_ASSERT(handle); return (void*)GetProcAddress((HINSTANCE)handle, name); } void dlclose(void* handle) { - KU_ASSERT(handle); + RYU_ASSERT(handle); FreeLibrary((HINSTANCE)handle); } #endif diff --git a/src/extension/loaded_extension.cpp b/src/extension/loaded_extension.cpp index 5429e6e6a3..df02605d41 100644 --- a/src/extension/loaded_extension.cpp +++ b/src/extension/loaded_extension.cpp @@ -15,7 +15,7 @@ std::string LoadedExtension::toCypher() { case ExtensionSource::STATIC_LINKED: return ""; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/function/aggregate/collect.cpp b/src/function/aggregate/collect.cpp index aeadaf374b..9ab966ea1c 100644 --- a/src/function/aggregate/collect.cpp +++ b/src/function/aggregate/collect.cpp @@ -24,7 +24,7 @@ struct CollectListElement { CollectListElement getNextElement() const { return CollectListElement{*getNextElementPtr()}; } uint8_t** getNextElementPtr() const { return reinterpret_cast(elementPtr); } void setNextElement(CollectListElement next) const { - KU_ASSERT(*getNextElementPtr() == nullptr); + RYU_ASSERT(*getNextElementPtr() == nullptr); *getNextElementPtr() = next.elementPtr; } void setNextElement(std::nullptr_t next) const { *getNextElementPtr() = next; } @@ -63,7 +63,7 @@ struct CollectState : public AggregateStateWithNull { void CollectState::appendList(const CollectState& o) { if (head.valid()) { - KU_ASSERT(tail.valid()); + RYU_ASSERT(tail.valid()); tail.setNextElement(o.head); tail = o.tail; } else { @@ -83,7 +83,7 @@ void CollectState::appendElement(ValueVector* input, uint32_t pos, if (tail.valid()) { tail.setNextElement(newElement); } else { - KU_ASSERT(!head.valid()); + RYU_ASSERT(!head.valid()); head = newElement; } tail = newElement; @@ -103,7 +103,7 @@ void CollectState::writeToVector(common::ValueVector* outputVector, uint64_t pos auto outputDataVector = common::ListVector::getDataVector(outputVector); CollectListElement curElement = head; for (auto i = 0u; i < listEntry.size; i++) { - KU_ASSERT(curElement.valid()); + RYU_ASSERT(curElement.valid()); outputDataVector->copyFromRowData(listEntry.offset + i, curElement.getDataPtr()); curElement = curElement.getNextElement(); } @@ -123,7 +123,7 @@ static void updateSingleValue(CollectState* state, ValueVector* input, uint32_t static void updateAll(uint8_t* state_, ValueVector* input, uint64_t multiplicity, InMemOverflowBuffer* overflowBuffer) { - KU_ASSERT(!input->state->isFlat()); + RYU_ASSERT(!input->state->isFlat()); auto state = reinterpret_cast(state_); auto& inputSelVector = input->state->getSelVector(); if (input->hasNoNullsGuarantee()) { @@ -163,7 +163,7 @@ static void combine(uint8_t* state_, uint8_t* otherState_, } static std::unique_ptr bindFunc(const ScalarBindFuncInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto aggFuncDefinition = reinterpret_cast(input.definition); aggFuncDefinition->parameterTypeIDs[0] = input.arguments[0]->dataType.getLogicalTypeID(); auto returnType = LogicalType::LIST(input.arguments[0]->dataType.copy()); diff --git a/src/function/aggregate/count.cpp b/src/function/aggregate/count.cpp index 8caa746d43..2c39d8395a 100644 --- a/src/function/aggregate/count.cpp +++ b/src/function/aggregate/count.cpp @@ -18,7 +18,7 @@ void CountFunction::updateAll(uint8_t* state_, ValueVector* input, uint64_t mult } void CountFunction::paramRewriteFunc(expression_vector& arguments) { - KU_ASSERT(arguments.size() == 1); + RYU_ASSERT(arguments.size() == 1); if (ExpressionUtil::isNodePattern(*arguments[0])) { arguments[0] = arguments[0]->constCast().getInternalID(); } else if (ExpressionUtil::isRelPattern(*arguments[0])) { diff --git a/src/function/aggregate/count_star.cpp b/src/function/aggregate/count_star.cpp index 415bc3a85d..2f0124ad62 100644 --- a/src/function/aggregate/count_star.cpp +++ b/src/function/aggregate/count_star.cpp @@ -9,7 +9,7 @@ namespace function { void CountStarFunction::updateAll(uint8_t* state_, ValueVector* input, uint64_t multiplicity, InMemOverflowBuffer* /*overflowBuffer*/) { auto state = reinterpret_cast(state_); - KU_ASSERT(input == nullptr); + RYU_ASSERT(input == nullptr); (void)input; state->count += multiplicity; } @@ -17,7 +17,7 @@ void CountStarFunction::updateAll(uint8_t* state_, ValueVector* input, uint64_t void CountStarFunction::updatePos(uint8_t* state_, ValueVector* input, uint64_t multiplicity, uint32_t /*pos*/, InMemOverflowBuffer* /*overflowBuffer*/) { auto state = reinterpret_cast(state_); - KU_ASSERT(input == nullptr); + RYU_ASSERT(input == nullptr); (void)input; state->count += multiplicity; } diff --git a/src/function/aggregate/min_max.cpp b/src/function/aggregate/min_max.cpp index 31efad7434..22458b07ec 100644 --- a/src/function/aggregate/min_max.cpp +++ b/src/function/aggregate/min_max.cpp @@ -23,7 +23,7 @@ static void getMinMaxFunction(std::string name, function_set& set) { MinMaxFunction::template combine, MinMaxFunction::finalize, isDistinct); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); set.push_back(std::move(func)); } } diff --git a/src/function/aggregate_function.cpp b/src/function/aggregate_function.cpp index fdd8856b71..5bb09c8ffb 100644 --- a/src/function/aggregate_function.cpp +++ b/src/function/aggregate_function.cpp @@ -53,7 +53,7 @@ void AggregateFunctionUtils::appendSumOrAvgFuncs(std::string name, common::Logic aggFunc = AggregateFunctionUtils::getAggFunc>(name, inputType, LogicalTypeID::DOUBLE, isDistinct); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); result.push_back(std::move(aggFunc)); } } diff --git a/src/function/array/array_functions.cpp b/src/function/array/array_functions.cpp index 58d49e9827..43fd900096 100644 --- a/src/function/array/array_functions.cpp +++ b/src/function/array/array_functions.cpp @@ -144,7 +144,7 @@ scalar_func_exec_t getScalarExecFunc(LogicalType type) { execFunc = getBinaryArrayExecFuncSwitchResultType(); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return execFunc; } diff --git a/src/function/base_lower_upper_operation.cpp b/src/function/base_lower_upper_operation.cpp index e6685ace5d..e05e70974f 100644 --- a/src/function/base_lower_upper_operation.cpp +++ b/src/function/base_lower_upper_operation.cpp @@ -28,7 +28,7 @@ uint32_t BaseLowerUpperFunction::getResultLen(char* inputStr, uint32_t inputLen, int convertedCodepoint = isUpper ? utf8proc_toupper(codepoint) : utf8proc_tolower(codepoint); int newSize = utf8proc_codepoint_length(convertedCodepoint); - KU_ASSERT(newSize >= 0); + RYU_ASSERT(newSize >= 0); outputLength += newSize; i += size; } else { @@ -45,7 +45,7 @@ void BaseLowerUpperFunction::convertCharCase(char* result, const char* input, in newSize = 1; if (input[charPos] & 0x80) { auto codepoint = utf8proc_codepoint(input + charPos, originalSize); - KU_ASSERT(codepoint >= 0); // Validity ensured by getResultLen. + RYU_ASSERT(codepoint >= 0); // Validity ensured by getResultLen. int convertedCodepoint = toUpper ? utf8proc_toupper(codepoint) : utf8proc_tolower(codepoint); utf8proc_codepoint_to_utf8(convertedCodepoint, newSize, result); diff --git a/src/function/built_in_function_utils.cpp b/src/function/built_in_function_utils.cpp index caab969ae4..3d3099706a 100644 --- a/src/function/built_in_function_utils.cpp +++ b/src/function/built_in_function_utils.cpp @@ -65,7 +65,7 @@ AggregateFunction* BuiltInFunctionsUtils::matchAggregateFunction(const std::stri } validateNonEmptyCandidateFunctions(candidateFunctions, name, inputTypes, isDistinct, functionSet); - KU_ASSERT(candidateFunctions.size() == 1); + RYU_ASSERT(candidateFunctions.size() == 1); return candidateFunctions[0]; } @@ -389,7 +389,7 @@ uint32_t BuiltInFunctionsUtils::castArray(LogicalTypeID targetTypeID) { // Additionally, we prefer function with string parameter because string is most permissive and // can be cast to any type. Function* BuiltInFunctionsUtils::getBestMatch(std::vector& functionsToMatch) { - KU_ASSERT(functionsToMatch.size() > 1); + RYU_ASSERT(functionsToMatch.size() > 1); Function* result = nullptr; auto cost = UNDEFINED_CAST_COST; for (auto& function : functionsToMatch) { @@ -409,7 +409,7 @@ Function* BuiltInFunctionsUtils::getBestMatch(std::vector& functionsT result = function; } } - KU_ASSERT(result != nullptr); + RYU_ASSERT(result != nullptr); return result; } @@ -419,7 +419,7 @@ uint32_t BuiltInFunctionsUtils::getFunctionCost(const std::vector& function->constPtrCast()->isVarLength : false); if (isVarLength) { - KU_ASSERT(function->parameterTypeIDs.size() == 1); + RYU_ASSERT(function->parameterTypeIDs.size() == 1); return matchVarLengthParameters(inputTypes, function->parameterTypeIDs[0]); } return matchParameters(inputTypes, function->parameterTypeIDs); diff --git a/src/function/cast_from_string_functions.cpp b/src/function/cast_from_string_functions.cpp index dcf682f7f7..20ee7838d5 100644 --- a/src/function/cast_from_string_functions.cpp +++ b/src/function/cast_from_string_functions.cpp @@ -183,7 +183,7 @@ static void skipWhitespace(const char*& input, const char* end) { // We only skip ASCII white spaces there. break; } else { - KU_ASSERT(*input >= -1); + RYU_ASSERT(*input >= -1); if (!isspace(*input)) { break; } @@ -769,7 +769,7 @@ static bool tryCastUnionField(ValueVector* vector, uint64_t rowToAdd, const char testAndSetValue(vector, rowToAdd, result, success); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; case LogicalTypeID::DATE: { @@ -961,7 +961,7 @@ void CastString::copyStringToVector(ValueVector* vector, uint64_t vectorPos, vector->setValue(vectorPos, val); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; case LogicalTypeID::DOUBLE: { @@ -1047,7 +1047,7 @@ void CastString::copyStringToVector(ValueVector* vector, uint64_t vectorPos, CastStringHelper::cast(strVal.data(), strVal.length(), val, vector, vectorPos, option); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/function/cast_string_non_nested_functions.cpp b/src/function/cast_string_non_nested_functions.cpp index 8645acdcdb..89e5639450 100644 --- a/src/function/cast_string_non_nested_functions.cpp +++ b/src/function/cast_string_non_nested_functions.cpp @@ -211,7 +211,7 @@ LogicalType inferMinimalTypeFromString(std::string_view str) { if (NumericLimits::isInBounds(int128val)) { return LogicalType::INT64(); } - KU_ASSERT(NumericLimits::isInBounds(int128val)); + RYU_ASSERT(NumericLimits::isInBounds(int128val)); return LogicalType::INT128(); } else if (trySimpleIntegerCast(cpy.data(), cpy.length(), uint128val)) { return LogicalType::UINT128(); @@ -225,7 +225,7 @@ LogicalType inferMinimalTypeFromString(std::string_view str) { } if (cpy.size() <= DECIMAL_PRECISION_LIMIT) { auto decimalPoint = cpy.find('.'); - KU_ASSERT(decimalPoint != std::string::npos); + RYU_ASSERT(decimalPoint != std::string::npos); return LogicalType::DECIMAL(cpy.size() - 1, cpy.size() - decimalPoint - 1); } else { return LogicalType::DOUBLE(); diff --git a/src/function/comparison_functions.cpp b/src/function/comparison_functions.cpp index 8b08b1e011..572fdd203b 100644 --- a/src/function/comparison_functions.cpp +++ b/src/function/comparison_functions.cpp @@ -96,7 +96,7 @@ static void executeNestedOperation(uint8_t& result, ValueVector* leftVector, rightVector->getValue(rightPos), result, leftVector, rightVector); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -186,7 +186,7 @@ static void executeNestedGreaterThan(uint8_t& isGreaterThan, uint8_t& isEqual, template<> void GreaterThan::operation(const list_entry_t& left, const list_entry_t& right, uint8_t& result, ValueVector* leftVector, ValueVector* rightVector) { - KU_ASSERT(leftVector->dataType == rightVector->dataType); + RYU_ASSERT(leftVector->dataType == rightVector->dataType); auto leftDataVector = ListVector::getDataVector(leftVector); auto rightDataVector = ListVector::getDataVector(rightVector); auto commonLength = std::min(left.size, right.size); @@ -206,7 +206,7 @@ void GreaterThan::operation(const list_entry_t& left, const list_entry_t& right, template<> void GreaterThan::operation(const struct_entry_t& left, const struct_entry_t& right, uint8_t& result, ValueVector* leftVector, ValueVector* rightVector) { - KU_ASSERT(leftVector->dataType == rightVector->dataType); + RYU_ASSERT(leftVector->dataType == rightVector->dataType); auto leftFields = StructVector::getFieldVectors(leftVector); auto rightFields = StructVector::getFieldVectors(rightVector); uint8_t isEqual = 0; diff --git a/src/function/gds/asp_destinations.cpp b/src/function/gds/asp_destinations.cpp index 2d5c00bbe0..ecf5fc3194 100644 --- a/src/function/gds/asp_destinations.cpp +++ b/src/function/gds/asp_destinations.cpp @@ -34,7 +34,7 @@ class SparseMultiplicitiesReference final : public Multiplicities { void pinTableID(table_id_t tableID) override { curData = spareObjects.getData(tableID); } void increaseMultiplicity(offset_t offset, multiplicity_t multiplicity) override { - KU_ASSERT(curData); + RYU_ASSERT(curData); if (curData->contains(offset)) { curData->at(offset) += multiplicity; } else { @@ -43,7 +43,7 @@ class SparseMultiplicitiesReference final : public Multiplicities { } multiplicity_t getMultiplicity(offset_t offset) override { - KU_ASSERT(curData); + RYU_ASSERT(curData); if (curData->contains(offset)) { return curData->at(offset); } @@ -64,12 +64,12 @@ class DenseMultiplicitiesReference final : public Multiplicities { void pinTableID(table_id_t tableID) override { curData = denseObjects.getData(tableID); } void increaseMultiplicity(offset_t offset, multiplicity_t multiplicity) override { - KU_ASSERT(curData); + RYU_ASSERT(curData); curData[offset].fetch_add(multiplicity); } multiplicity_t getMultiplicity(offset_t offset) override { - KU_ASSERT(curData); + RYU_ASSERT(curData); return curData[offset].load(std::memory_order_relaxed); } @@ -101,7 +101,7 @@ class MultiplicitiesPair { curMultiplicities = curDenseMultiplicities.get(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -116,7 +116,7 @@ class MultiplicitiesPair { nextMultiplicities = nextDenseMultiplicities.get(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -130,7 +130,7 @@ class MultiplicitiesPair { Multiplicities* getCurrentMultiplicities() { return curMultiplicities; } void switchToDense(ExecutionContext* context) { - KU_ASSERT(densityState == GDSDensityState::SPARSE); + RYU_ASSERT(densityState == GDSDensityState::SPARSE); densityState = GDSDensityState::DENSE; for (auto& [tableID, maxOffset] : maxOffsetMap) { denseObjects.allocate(tableID, maxOffset, MemoryManager::Get(*context->clientContext)); diff --git a/src/function/gds/awsp_paths.cpp b/src/function/gds/awsp_paths.cpp index 10cd62d6ca..830efe716b 100644 --- a/src/function/gds/awsp_paths.cpp +++ b/src/function/gds/awsp_paths.cpp @@ -93,7 +93,7 @@ class AWSPPathsOutputWriter : public PathsOutputWriter { if (backtracking) { auto next = curPath[topIdx]->getNextPtr(); if (next != nullptr) { // Find next top node with the same cost. - KU_ASSERT(curPath[topIdx]->getCost() == next->getCost()); + RYU_ASSERT(curPath[topIdx]->getCost() == next->getCost()); curPath[topIdx] = next; backtracking = false; } else { // Move to next top. @@ -101,7 +101,7 @@ class AWSPPathsOutputWriter : public PathsOutputWriter { } } else { // Forward track fill path. auto parent = bfsGraph.getParentListHead(curPath[topIdx]->getNodeID()); - KU_ASSERT(parent != nullptr); + RYU_ASSERT(parent != nullptr); curPath.push_back(parent); backtracking = false; } diff --git a/src/function/gds/bfs_graph.cpp b/src/function/gds/bfs_graph.cpp index 1149c514bb..e2fbdf372c 100644 --- a/src/function/gds/bfs_graph.cpp +++ b/src/function/gds/bfs_graph.cpp @@ -134,7 +134,7 @@ bool DenseBFSGraph::tryAddSingleParentWithWeight(nodeID_t boundNodeID, relID_t e } ParentList* DenseBFSGraph::getParentListHead(offset_t offset) { - KU_ASSERT(curData); + RYU_ASSERT(curData); return curData[offset].load(std::memory_order_relaxed); } @@ -143,7 +143,7 @@ ParentList* DenseBFSGraph::getParentListHead(nodeID_t nodeID) { } void DenseBFSGraph::setParentList(offset_t offset, ParentList* parentList) { - KU_ASSERT(curData && getParentListHead(offset) == nullptr); + RYU_ASSERT(curData && getParentListHead(offset) == nullptr); curData[offset].store(parentList, std::memory_order_relaxed); } @@ -231,7 +231,7 @@ bool SparseBFSGraph::tryAddSingleParentWithWeight(nodeID_t boundNodeID, relID_t } ParentList* SparseBFSGraph::getParentListHead(offset_t offset) { - KU_ASSERT(curData); + RYU_ASSERT(curData); if (!curData->contains(offset)) { return nullptr; } @@ -247,7 +247,7 @@ ParentList* SparseBFSGraph::getParentListHead(nodeID_t nodeID) { } void SparseBFSGraph::setParentList(offset_t offset, ParentList* parentList) { - KU_ASSERT(!curData->contains(offset)); + RYU_ASSERT(!curData->contains(offset)); curData->insert({offset, parentList}); } @@ -259,7 +259,7 @@ BFSGraphManager::BFSGraphManager(table_id_map_t maxOffsetMap, } void BFSGraphManager::switchToDense(ExecutionContext* context, Graph* graph) { - KU_ASSERT(state == GDSDensityState::SPARSE); + RYU_ASSERT(state == GDSDensityState::SPARSE); state = GDSDensityState::DENSE; denseBFSGraph->init(context, graph); denseBFSGraph->blocks = std::move(sparseBFSGraph->blocks); diff --git a/src/function/gds/gds.cpp b/src/function/gds/gds.cpp index cd9952706b..d25df518b0 100644 --- a/src/function/gds/gds.cpp +++ b/src/function/gds/gds.cpp @@ -35,7 +35,7 @@ void GDSFuncSharedState::setGraphNodeMask(std::unique_ptr mas static expression_vector getResultColumns(const std::string& cypher, ClientContext* context) { auto parsedStatements = parser::Parser::parseQuery(cypher); - KU_ASSERT(parsedStatements.size() == 1); + RYU_ASSERT(parsedStatements.size() == 1); auto binder = Binder(context); auto boundStatement = binder.bind(*parsedStatements[0]); return boundStatement->getStatementResult()->getColumns(); @@ -84,12 +84,12 @@ static NativeGraphEntryTableInfo bindNodeEntry(ClientContext& context, const std if (!predicate.empty()) { auto cypher = stringFormat("MATCH (n:`{}`) RETURN n, {}", nodeEntry->getName(), predicate); auto columns = getResultColumns(cypher, &context); - KU_ASSERT(columns.size() == 2); + RYU_ASSERT(columns.size() == 2); return {nodeEntry, columns[0], columns[1]}; } else { auto cypher = stringFormat("MATCH (n:`{}`) RETURN n", nodeEntry->getName()); auto columns = getResultColumns(cypher, &context); - KU_ASSERT(columns.size() == 1); + RYU_ASSERT(columns.size() == 1); return {nodeEntry, columns[0], nullptr /* empty predicate */}; } } @@ -107,12 +107,12 @@ static NativeGraphEntryTableInfo bindRelEntry(ClientContext& context, const std: auto cypher = stringFormat("MATCH ()-[r:`{}`]->() RETURN r, {}", relEntry->getName(), predicate); auto columns = getResultColumns(cypher, &context); - KU_ASSERT(columns.size() == 2); + RYU_ASSERT(columns.size() == 2); return {relEntry, columns[0], columns[1]}; } else { auto cypher = stringFormat("MATCH ()-[r:`{}`]->() RETURN r", relEntry->getName()); auto columns = getResultColumns(cypher, &context); - KU_ASSERT(columns.size() == 1); + RYU_ASSERT(columns.size() == 1); return {relEntry, columns[0], nullptr /* empty predicate */}; } } @@ -219,7 +219,7 @@ void GDSFunction::getLogicalPlan(Planner* planner, const BoundReadingClause& rea planner->planReadOp(std::move(op), predicates, plan); auto nodeOutput = bindData->output[0]->ptrCast(); - KU_ASSERT(nodeOutput != nullptr); + RYU_ASSERT(nodeOutput != nullptr); planner->getCardinliatyEstimatorUnsafe().init(*nodeOutput); auto scanPlan = planner->getNodePropertyScanPlan(*nodeOutput); if (scanPlan.isEmpty()) { @@ -255,9 +255,9 @@ std::unique_ptr GDSFunction::getPhysicalPlan(PlanMapper* planM auto maskMap = funcSharedState->getGraphNodeMaskMap(); planMapper->addOperatorMapping(logicalOp, call.get()); for (auto logicalRoot : logicalCall->getChildren()) { - KU_ASSERT(logicalRoot->getNumChildren() == 1); + RYU_ASSERT(logicalRoot->getNumChildren() == 1); auto child = logicalRoot->getChild(0); - KU_ASSERT(child->getOperatorType() == LogicalOperatorType::SEMI_MASKER); + RYU_ASSERT(child->getOperatorType() == LogicalOperatorType::SEMI_MASKER); auto logicalSemiMasker = child->ptrCast(); logicalSemiMasker->addTarget(logicalOp); for (auto tableID : logicalSemiMasker->getNodeTableIDs()) { diff --git a/src/function/gds/gds_frontier.cpp b/src/function/gds/gds_frontier.cpp index 1600f93314..ffeaabf803 100644 --- a/src/function/gds/gds_frontier.cpp +++ b/src/function/gds/gds_frontier.cpp @@ -16,12 +16,12 @@ void SparseFrontier::pinTableID(table_id_t tableID) { } void SparseFrontier::addNode(nodeID_t nodeID, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); addNode(nodeID.offset, iter); } void SparseFrontier::addNode(offset_t offset, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); if (!curData->contains(offset)) { curData->insert({offset, iter}); } else { @@ -30,14 +30,14 @@ void SparseFrontier::addNode(offset_t offset, iteration_t iter) { } void SparseFrontier::addNodes(const std::vector& nodeIDs, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); for (auto& nodeID : nodeIDs) { addNode(nodeID.offset, iter); } } iteration_t SparseFrontier::getIteration(offset_t offset) const { - KU_ASSERT(curData); + RYU_ASSERT(curData); if (!curData->contains(offset)) { return FRONTIER_UNVISITED; } @@ -49,7 +49,7 @@ void SparseFrontierReference::pinTableID(table_id_t tableID) { } void SparseFrontierReference::addNode(offset_t offset, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); if (!curData->contains(offset)) { curData->insert({offset, iter}); } else { @@ -58,19 +58,19 @@ void SparseFrontierReference::addNode(offset_t offset, iteration_t iter) { } void SparseFrontierReference::addNode(nodeID_t nodeID, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); addNode(nodeID.offset, iter); } void SparseFrontierReference::addNodes(const std::vector& nodeIDs, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); for (auto nodeID : nodeIDs) { addNode(nodeID.offset, iter); } } iteration_t SparseFrontierReference::getIteration(offset_t offset) const { - KU_ASSERT(curData); + RYU_ASSERT(curData); if (!curData->contains(offset)) { return FRONTIER_UNVISITED; } @@ -120,24 +120,24 @@ void DenseFrontier::pinTableID(table_id_t tableID) { } void DenseFrontier::addNode(nodeID_t nodeID, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); curData[nodeID.offset].store(iter, std::memory_order_relaxed); } void DenseFrontier::addNode(offset_t offset, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); curData[offset].store(iter, std::memory_order_relaxed); } void DenseFrontier::addNodes(const std::vector& nodeIDs, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); for (auto nodeID : nodeIDs) { curData[nodeID.offset].store(iter, std::memory_order_relaxed); } } iteration_t DenseFrontier::getIteration(offset_t offset) const { - KU_ASSERT(curData); + RYU_ASSERT(curData); return curData[offset].load(std::memory_order_relaxed); } @@ -190,24 +190,24 @@ void DenseFrontierReference::pinTableID(table_id_t tableID) { } void DenseFrontierReference::addNode(nodeID_t nodeID, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); curData[nodeID.offset].store(iter, std::memory_order_relaxed); } void DenseFrontierReference::addNode(offset_t offset, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); curData[offset].store(iter, std::memory_order_relaxed); } void DenseFrontierReference::addNodes(const std::vector& nodeIDs, iteration_t iter) { - KU_ASSERT(curData); + RYU_ASSERT(curData); for (auto nodeID : nodeIDs) { curData[nodeID.offset].store(iter, std::memory_order_relaxed); } } iteration_t DenseFrontierReference::getIteration(offset_t offset) const { - KU_ASSERT(curData); + RYU_ASSERT(curData); return curData[offset].load(std::memory_order_relaxed); } @@ -261,7 +261,7 @@ Frontier* SPFrontierPair::getFrontier() { return denseFrontier.get(); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -289,7 +289,7 @@ void SPFrontierPair::beginNewIterationInternalNoLock() { nextFrontier = nextDenseFrontier.get(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -311,7 +311,7 @@ offset_t SPFrontierPair::getNumActiveNodesInCurrentFrontier(NodeOffsetMaskMap& m } std::unordered_set SPFrontierPair::getActiveNodesOnCurrentFrontier() { - KU_ASSERT(state == GDSDensityState::SPARSE); + RYU_ASSERT(state == GDSDensityState::SPARSE); std::unordered_set result; for (auto& [offset, iter] : curSparseFrontier->getCurrentData()) { if (iter != curIter - 1) { @@ -323,7 +323,7 @@ std::unordered_set SPFrontierPair::getActiveNodesOnCurrentFrontier() { } void SPFrontierPair::switchToDense(ExecutionContext* context, graph::Graph* graph) { - KU_ASSERT(state == GDSDensityState::SPARSE); + RYU_ASSERT(state == GDSDensityState::SPARSE); state = GDSDensityState::DENSE; denseFrontier->init(context, graph, FRONTIER_UNVISITED); for (auto& [tableID, map] : sparseFrontier->sparseObjects.getData()) { @@ -359,12 +359,12 @@ void DenseSparseDynamicFrontierPair::beginNewIterationInternalNoLock() { nextFrontier = nextDenseFrontier.get(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } std::unordered_set DenseSparseDynamicFrontierPair::getActiveNodesOnCurrentFrontier() { - KU_ASSERT(state == GDSDensityState::SPARSE); + RYU_ASSERT(state == GDSDensityState::SPARSE); std::unordered_set result; for (auto& [offset, iter] : *curSparseFrontier->curData) { if (iter != curIter - 1) { @@ -376,7 +376,7 @@ std::unordered_set DenseSparseDynamicFrontierPair::getActiveNodesOnCur } void DenseSparseDynamicFrontierPair::switchToDense(ExecutionContext* context, Graph* graph) { - KU_ASSERT(state == GDSDensityState::SPARSE); + RYU_ASSERT(state == GDSDensityState::SPARSE); state = GDSDensityState::DENSE; curDenseFrontier->init(context, graph, FRONTIER_UNVISITED); nextDenseFrontier->init(context, graph, FRONTIER_UNVISITED); diff --git a/src/function/gds/gds_task.cpp b/src/function/gds/gds_task.cpp index c2e2e70e94..e451ae686e 100644 --- a/src/function/gds/gds_task.cpp +++ b/src/function/gds/gds_task.cpp @@ -17,7 +17,7 @@ table_id_t FrontierTaskInfo::getBoundTableID() const { case ExtendDirection::BWD: return dstTableID; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -28,7 +28,7 @@ table_id_t FrontierTaskInfo::getNbrTableID() const { case ExtendDirection::BWD: return srcTableID; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -78,7 +78,7 @@ void FrontierTask::run() { } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } if (numActiveNodes) { sharedState->frontierPair.setActiveNodesForNextIter(); @@ -114,7 +114,7 @@ void FrontierTask::runSparse() { } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } if (numActiveNodes) { sharedState->frontierPair.setActiveNodesForNextIter(); @@ -142,7 +142,7 @@ void VertexComputeTask::run() { } void VertexComputeTask::runSparse() { - KU_ASSERT(!info.hasPropertiesToScan()); + RYU_ASSERT(!info.hasPropertiesToScan()); auto localVc = info.vc.copy(); localVc->vertexCompute(info.tableEntry->getTableID()); } diff --git a/src/function/gds/gds_utils.cpp b/src/function/gds/gds_utils.cpp index fae5cfdc14..bb5c083324 100644 --- a/src/function/gds/gds_utils.cpp +++ b/src/function/gds/gds_utils.cpp @@ -81,7 +81,7 @@ static void runOneIteration(ExecutionContext* context, Graph* graph, propertiesToScan); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/function/gds/output_writer.cpp b/src/function/gds/output_writer.cpp index 9b9faef7e5..a6abc5281b 100644 --- a/src/function/gds/output_writer.cpp +++ b/src/function/gds/output_writer.cpp @@ -58,7 +58,7 @@ PathsOutputWriter::PathsOutputWriter(main::ClientContext* context, static void addListEntry(ValueVector* vector, uint64_t length) { vector->resetAuxiliaryBuffer(); auto entry = ListVector::addList(vector, length); - KU_ASSERT(entry.offset == 0); + RYU_ASSERT(entry.offset == 0); vector->setValue(0, entry); } @@ -249,7 +249,7 @@ bool PathsOutputWriter::checkAppendSemantic(const std::vector& path case PathSemantic::ACYCLIC: return isAppendAcyclic(path, candidate); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -263,7 +263,7 @@ bool PathsOutputWriter::checkReplaceTopSemantic(const std::vector& case PathSemantic::ACYCLIC: return isReplaceTopAcyclic(path, candidate); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -310,12 +310,12 @@ bool PathsOutputWriter::isReplaceTopAcyclic(const std::vector& path } static void setLength(ValueVector* vector, uint16_t length) { - KU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UINT16); + RYU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UINT16); vector->setValue(0, length); } void PathsOutputWriter::beginWritePath(idx_t length) const { - KU_ASSERT(info.writePath); + RYU_ASSERT(info.writePath); addListEntry(pathNodeIDsVector.get(), length > 1 ? length - 1 : 0); addListEntry(pathEdgeIDsVector.get(), length); if (info.writeEdgeDirection) { @@ -382,7 +382,7 @@ void SPPathsOutputWriter::writeInternal(FactorizedTable& fTable, nodeID_t dstNod return; } if (dstNodeID == sourceNodeID_) { // Avoid writing source - KU_ASSERT(firstParent->getIter() == FRONTIER_INITIAL_VISITED); + RYU_ASSERT(firstParent->getIter() == FRONTIER_INITIAL_VISITED); return; } if (!info.hasNodeMask() && info.semantic == PathSemantic::WALK) { diff --git a/src/function/gds/wsp_destinations.cpp b/src/function/gds/wsp_destinations.cpp index 5e55f3f16b..31be6a137c 100644 --- a/src/function/gds/wsp_destinations.cpp +++ b/src/function/gds/wsp_destinations.cpp @@ -33,7 +33,7 @@ class SparseCostsReference : public Costs { void pinTableID(table_id_t tableID) override { curData = sparseObjects.getData(tableID); } void setCost(offset_t offset, double cost) override { - KU_ASSERT(curData != nullptr); + RYU_ASSERT(curData != nullptr); if (curData->contains(offset)) { curData->at(offset) = cost; } else { @@ -51,7 +51,7 @@ class SparseCostsReference : public Costs { } double getCost(offset_t offset) override { - KU_ASSERT(curData != nullptr); + RYU_ASSERT(curData != nullptr); if (curData->contains(offset)) { return curData->at(offset); } @@ -71,7 +71,7 @@ class DenseCostsReference : public Costs { void pinTableID(table_id_t tableID) override { curData = denseObjects.getData(tableID); } void setCost(offset_t offset, double cost) override { - KU_ASSERT(curData != nullptr); + RYU_ASSERT(curData != nullptr); curData[offset].store(cost, std::memory_order_relaxed); } @@ -86,7 +86,7 @@ class DenseCostsReference : public Costs { } double getCost(offset_t offset) override { - KU_ASSERT(curData != nullptr); + RYU_ASSERT(curData != nullptr); return curData[offset].load(std::memory_order_relaxed); } @@ -121,7 +121,7 @@ class CostsPair { curCosts = curDenseCosts.get(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -136,19 +136,19 @@ class CostsPair { nextCosts = nextDenseCosts.get(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // CAS update nbrOffset if new path from boundOffset has a smaller cost. bool update(offset_t boundOffset, offset_t nbrOffset, double val) { - KU_ASSERT(curCosts && nextCosts); + RYU_ASSERT(curCosts && nextCosts); auto newCost = curCosts->getCost(boundOffset) + val; return nextCosts->tryReplaceWithMinCost(nbrOffset, newCost); } void switchToDense(ExecutionContext* context) { - KU_ASSERT(densityState == GDSDensityState::SPARSE); + RYU_ASSERT(densityState == GDSDensityState::SPARSE); densityState = GDSDensityState::DENSE; auto mm = MemoryManager::Get(*context->clientContext); for (auto& [tableID, maxOffset] : maxOffsetMap) { diff --git a/src/function/internal_id/internal_id_creation_function.cpp b/src/function/internal_id/internal_id_creation_function.cpp index 0cfda1f35f..b4f0d4aa07 100644 --- a/src/function/internal_id/internal_id_creation_function.cpp +++ b/src/function/internal_id/internal_id_creation_function.cpp @@ -25,7 +25,7 @@ function_set InternalIDCreationFunction::getFunctionSet() { execFunc = ScalarFunction::BinaryExecFunction; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); result.push_back(std::make_unique(name, std::vector{typeID, typeID}, LogicalTypeID::INTERNAL_ID, execFunc)); diff --git a/src/function/list/list_extract_function.cpp b/src/function/list/list_extract_function.cpp index 045502ce78..e0eef0a595 100644 --- a/src/function/list/list_extract_function.cpp +++ b/src/function/list/list_extract_function.cpp @@ -13,7 +13,7 @@ static void BinaryExecListExtractFunction( const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector, dataPtr); diff --git a/src/function/list/list_filter.cpp b/src/function/list/list_filter.cpp index cbe645401b..3135406a11 100644 --- a/src/function/list/list_filter.cpp +++ b/src/function/list/list_filter.cpp @@ -32,7 +32,7 @@ static void constEvaluateFilterResult(const common::ValueVector& inputVector, const common::SelectionVector& filterSelVector, evaluator::ListSliceInfo* sliceInfo) { auto srcDataVector = ListVector::getDataVector(&inputVector); auto dstDataVector = ListVector::getDataVector(&result); - KU_ASSERT(!filterVector.isNull(filterSelVector[0])); + RYU_ASSERT(!filterVector.isNull(filterSelVector[0])); auto filterResult = filterVector.getValue(filterSelVector[0]); // resolve data vector @@ -63,7 +63,7 @@ static void evaluateFilterResult(const common::ValueVector& inputVector, common::ValueVector& result, const common::ValueVector& filterVector, [[maybe_unused]] const common::SelectionVector& filterSelVector, evaluator::ListSliceInfo* sliceInfo) { - KU_ASSERT(filterSelVector.isUnfiltered()); + RYU_ASSERT(filterSelVector.isUnfiltered()); auto srcDataVector = ListVector::getDataVector(&inputVector); auto dstDataVector = ListVector::getDataVector(&result); @@ -96,7 +96,7 @@ static void execFunc(const std::vector>& in sliceInfo->overrideAndSaveParamStates(listLambdaBindData->lambdaParamEvaluators); listLambdaBindData->rootEvaluator->evaluate(); - KU_ASSERT(input.size() == 2); + RYU_ASSERT(input.size() == 2); auto& listInputSelVector = *inputSelVectors[0]; auto& filterVector = *input[1]; auto& filterSelVector = *inputSelVectors[1]; diff --git a/src/function/list/list_range_function.cpp b/src/function/list/list_range_function.cpp index 2a573049c2..912b2acc47 100644 --- a/src/function/list/list_range_function.cpp +++ b/src/function/list/list_range_function.cpp @@ -57,7 +57,7 @@ static scalar_func_exec_t getBinaryExecFunc(const LogicalType& type) { [&execFunc](T) { execFunc = ScalarFunction::BinaryExecListStructFunction; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return execFunc; } @@ -68,7 +68,7 @@ static scalar_func_exec_t getTernaryExecFunc(const LogicalType& type) { [&execFunc](T) { execFunc = ScalarFunction::TernaryExecListStructFunction; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return execFunc; } diff --git a/src/function/list/list_reduce.cpp b/src/function/list/list_reduce.cpp index b57f94915a..7702e3ab7f 100644 --- a/src/function/list/list_reduce.cpp +++ b/src/function/list/list_reduce.cpp @@ -30,7 +30,7 @@ static void processDataEntry(offset_t curOffset, sel_t listEntryPos, common::Val evaluator::ListLambdaBindData& bindData) { common::ValueVector& inputDataVector = *ListVector::getDataVector(&inputVector); const auto listEntry = inputVector.getValue(listEntryPos); - KU_ASSERT(listEntry.size > 0); + RYU_ASSERT(listEntry.size > 0); offset_t offsetInList = curOffset - listEntry.offset; if (offsetInList == 0 && listEntry.size == 1) { // if list size is 1 the reduce result is equal to the single value @@ -77,7 +77,7 @@ static void reduceSlice(evaluator::ListSliceInfo& sliceInfo, common::ValueVector static void execFunc(const std::vector>& input, const std::vector& inputSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* bindData) { - KU_ASSERT(input.size() == 2); + RYU_ASSERT(input.size() == 2); auto listLambdaBindData = reinterpret_cast(bindData); const auto* inputVector = input[0].get(); reduceSlice(*listLambdaBindData->sliceInfo, result, *inputVector, *input[1].get(), diff --git a/src/function/list/list_slice_function.cpp b/src/function/list/list_slice_function.cpp index d10f06cc7e..8f113c583a 100644 --- a/src/function/list/list_slice_function.cpp +++ b/src/function/list/list_slice_function.cpp @@ -54,7 +54,7 @@ struct ListSlice { }; static std::unique_ptr bindFunc(const ScalarBindFuncInput& input) { - KU_ASSERT(input.arguments.size() == 3); + RYU_ASSERT(input.arguments.size() == 3); std::vector paramTypes; auto& arg0Type = input.arguments[0]->getDataType(); LogicalType resultType; diff --git a/src/function/list/list_sort_function.cpp b/src/function/list/list_sort_function.cpp index 833587dda7..095cb698dc 100644 --- a/src/function/list/list_sort_function.cpp +++ b/src/function/list/list_sort_function.cpp @@ -40,7 +40,7 @@ static std::unique_ptr ListSortBindFunc(ScalarBindFuncInput in [&input, &scalarFunction](T) { scalarFunction->execFunc = getListSortExecFunction>(input.arguments); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return FunctionBindData::getSimpleBindData(input.arguments, input.arguments[0]->getDataType()); } @@ -51,7 +51,7 @@ static std::unique_ptr ListReverseSortBindFunc(const ScalarBin [&input, &scalarFunction](T) { scalarFunction->execFunc = getListSortExecFunction>(input.arguments); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return FunctionBindData::getSimpleBindData(input.arguments, input.arguments[0]->getDataType()); } diff --git a/src/function/list/list_transform.cpp b/src/function/list/list_transform.cpp index a5e7789dcf..8004ebe479 100644 --- a/src/function/list/list_transform.cpp +++ b/src/function/list/list_transform.cpp @@ -60,7 +60,7 @@ static void execFunc(const std::vector>& input, auto& inputVector = *input[0]; const auto& inputSelVector = *inputSelVectors[0]; - KU_ASSERT(input.size() == 2); + RYU_ASSERT(input.size() == 2); if (!bindData->lambdaParamEvaluators.empty()) { if (sliceInfo->done()) { ListVector::copyListEntryAndBufferMetaData(result, *resultSelVector, inputVector, diff --git a/src/function/list/quantifier_functions.cpp b/src/function/list/quantifier_functions.cpp index 82cc1e0ef9..6b594688e5 100644 --- a/src/function/list/quantifier_functions.cpp +++ b/src/function/list/quantifier_functions.cpp @@ -24,7 +24,7 @@ void execQuantifierFunc(quantifier_handler handler, bool isConstantTrueExpr = listLambdaBindData->lambdaParamEvaluators.empty() && filterVector.getValue(filterVector.state->getSelVector()[0]); listLambdaBindData->rootEvaluator->evaluate(); - KU_ASSERT(input.size() == 2); + RYU_ASSERT(input.size() == 2); auto& listInputSelVector = *inputSelVectors[0]; uint64_t numSelectedValues = 0; for (auto i = 0u; i < listInputSelVector.getSelSize(); ++i) { diff --git a/src/function/path/length_function.cpp b/src/function/path/length_function.cpp index ca17732ae5..064d744b70 100644 --- a/src/function/path/length_function.cpp +++ b/src/function/path/length_function.cpp @@ -13,7 +13,7 @@ namespace ryu { namespace function { static std::shared_ptr rewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto param = input.arguments[0].get(); auto binder = input.expressionBinder; if (param->expressionType == ExpressionType::PATH) { @@ -43,7 +43,7 @@ static std::shared_ptr rewriteFunc(const RewriteFunctionBindInput& i } else if (ExpressionUtil::isRecursiveRelPattern(*param)) { return param->constPtrCast()->getLengthExpression(); } - KU_UNREACHABLE; + RYU_UNREACHABLE; } function_set LengthFunction::getFunctionSet() { diff --git a/src/function/path/properties_function.cpp b/src/function/path/properties_function.cpp index 126dc38f0d..50a6945c5c 100644 --- a/src/function/path/properties_function.cpp +++ b/src/function/path/properties_function.cpp @@ -42,7 +42,7 @@ static std::unique_ptr bindFunc(const ScalarBindFuncInput& inp static void compileFunc(FunctionBindData* bindData, const std::vector>& parameters, std::shared_ptr& result) { - KU_ASSERT(parameters[0]->dataType.getPhysicalType() == PhysicalTypeID::LIST); + RYU_ASSERT(parameters[0]->dataType.getPhysicalType() == PhysicalTypeID::LIST); auto& propertiesBindData = bindData->cast(); auto fieldVector = StructVector::getFieldVector(ListVector::getDataVector(parameters[0].get()), propertiesBindData.childIdx); diff --git a/src/function/pattern/cost_function.cpp b/src/function/pattern/cost_function.cpp index 8691deea3f..46fcd2a84c 100644 --- a/src/function/pattern/cost_function.cpp +++ b/src/function/pattern/cost_function.cpp @@ -10,9 +10,9 @@ namespace ryu { namespace function { static std::shared_ptr rewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto param = input.arguments[0].get(); - KU_ASSERT(param->getDataType().getLogicalTypeID() == LogicalTypeID::RECURSIVE_REL); + RYU_ASSERT(param->getDataType().getLogicalTypeID() == LogicalTypeID::RECURSIVE_REL); auto recursiveInfo = param->ptrCast()->getRecursiveInfo(); if (recursiveInfo->bindData->weightOutputExpr == nullptr) { throw BinderException( diff --git a/src/function/pattern/id_function.cpp b/src/function/pattern/id_function.cpp index 0e4d637ddf..020a1bf43e 100644 --- a/src/function/pattern/id_function.cpp +++ b/src/function/pattern/id_function.cpp @@ -13,7 +13,7 @@ namespace ryu { namespace function { static std::shared_ptr rewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto param = input.arguments[0].get(); if (ExpressionUtil::isNodePattern(*param)) { auto node = param->constPtrCast(); diff --git a/src/function/pattern/label_function.cpp b/src/function/pattern/label_function.cpp index 87488dd84c..33e782d0e4 100644 --- a/src/function/pattern/label_function.cpp +++ b/src/function/pattern/label_function.cpp @@ -23,7 +23,7 @@ struct Label { static void operation(internalID_t& left, list_entry_t& right, ku_string_t& result, ValueVector& leftVector, ValueVector& rightVector, ValueVector& resultVector, uint64_t resPos) { - KU_ASSERT(left.tableID < right.size); + RYU_ASSERT(left.tableID < right.size); ListExtract::operation(right, left.tableID + 1 /* listExtract requires 1-based index */, result, rightVector, leftVector, resultVector, resPos); } @@ -32,7 +32,7 @@ struct Label { static void execFunction(const std::vector>& params, const std::vector& paramSelVectors, ValueVector& result, SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector, dataPtr); @@ -81,7 +81,7 @@ static std::unordered_map getRelTableIDToLabel( } std::shared_ptr LabelFunction::rewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto argument = input.arguments[0].get(); auto expressionBinder = input.expressionBinder; if (ExpressionUtil::isNullLiteral(*argument)) { @@ -126,7 +126,7 @@ std::shared_ptr LabelFunction::rewriteFunc(const RewriteFunctionBind auto map = getRelTableIDToLabel(rel.getEntries()); children.push_back(getLabelsAsLiteral(map, expressionBinder)); } - KU_ASSERT(children.size() == 2); + RYU_ASSERT(children.size() == 2); auto function = std::make_unique(LabelFunction::name, std::vector{LogicalTypeID::STRING, LogicalTypeID::INT64}, LogicalTypeID::STRING, execFunction); diff --git a/src/function/pattern/start_end_node_function.cpp b/src/function/pattern/start_end_node_function.cpp index 5aeb528138..82019d3a12 100644 --- a/src/function/pattern/start_end_node_function.cpp +++ b/src/function/pattern/start_end_node_function.cpp @@ -12,7 +12,7 @@ namespace ryu { namespace function { static std::shared_ptr startRewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto param = input.arguments[0].get(); if (ExpressionUtil::isRelPattern(*param)) { return param->constCast().getSrcNode(); @@ -31,7 +31,7 @@ function_set StartNodeFunction::getFunctionSet() { } static std::shared_ptr endRewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto param = input.arguments[0].get(); if (ExpressionUtil::isRelPattern(*param)) { return param->constCast().getDstNode(); diff --git a/src/function/string/concat_ws.cpp b/src/function/string/concat_ws.cpp index 8faaea1e49..a571979299 100644 --- a/src/function/string/concat_ws.cpp +++ b/src/function/string/concat_ws.cpp @@ -91,7 +91,7 @@ void execFunc(const std::vector>& parameter }); memcpy(resultStr.prefix, resultStr.getData(), std::min(resultStr.len, ku_string_t::PREFIX_LENGTH)); - KU_ASSERT(resultBuffer - resultStr.getData() == len); + RYU_ASSERT(resultBuffer - resultStr.getData() == len); result.setNull(pos, false /* isNull */); result.setValue(pos, resultStr); } diff --git a/src/function/string/regex_replace_function.cpp b/src/function/string/regex_replace_function.cpp index 302f03665d..334f0c7dfd 100644 --- a/src/function/string/regex_replace_function.cpp +++ b/src/function/string/regex_replace_function.cpp @@ -72,7 +72,7 @@ static re2_replace_func_t bindReplaceFunc(const binder::expression_vector& expr) result = RE2::GlobalReplace; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return result; } @@ -98,7 +98,7 @@ scalar_func_exec_t getExecFunc(const binder::expression_vector& expr) { ku_string_t, OP>; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return execFunc; } diff --git a/src/function/struct/keys_function.cpp b/src/function/struct/keys_function.cpp index 0144046407..ac47dcd701 100644 --- a/src/function/struct/keys_function.cpp +++ b/src/function/struct/keys_function.cpp @@ -12,7 +12,7 @@ namespace ryu { namespace function { static std::shared_ptr rewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); auto argument = input.arguments[0].get(); auto expressionBinder = input.expressionBinder; if (ExpressionUtil::isNullLiteral(*argument)) { diff --git a/src/function/struct/struct_extract_function.cpp b/src/function/struct/struct_extract_function.cpp index f8f1f4740d..6ed09f515c 100644 --- a/src/function/struct/struct_extract_function.cpp +++ b/src/function/struct/struct_extract_function.cpp @@ -33,7 +33,7 @@ std::unique_ptr StructExtractFunctions::bindFunc( void StructExtractFunctions::compileFunc(FunctionBindData* bindData, const std::vector>& parameters, std::shared_ptr& result) { - KU_ASSERT(parameters[0]->dataType.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(parameters[0]->dataType.getPhysicalType() == PhysicalTypeID::STRUCT); auto& structBindData = bindData->cast(); result = StructVector::getFieldVector(parameters[0].get(), structBindData.childIdx); result->state = parameters[0]->state; diff --git a/src/function/struct/struct_pack_function.cpp b/src/function/struct/struct_pack_function.cpp index 364871e149..91efb4e165 100644 --- a/src/function/struct/struct_pack_function.cpp +++ b/src/function/struct/struct_pack_function.cpp @@ -64,7 +64,7 @@ static void copyParameterValueToStructFieldVector(const ValueVector* parameter, ValueVector* structField, DataChunkState* structVectorState) { // If the parameter is unFlat, then its state must be consistent with the result's state. // Thus, we don't need to copy values to structFieldVector. - KU_ASSERT(parameter->state->isFlat()); + RYU_ASSERT(parameter->state->isFlat()); auto paramPos = parameter->state->getSelVector()[0]; if (structVectorState->isFlat()) { auto pos = structVectorState->getSelVector()[0]; @@ -97,7 +97,7 @@ void StructPackFunctions::execFunc( void StructPackFunctions::undirectedRelPackExecFunc( const std::vector>& parameters, ValueVector& result, void*) { - KU_ASSERT(parameters.size() > 1); + RYU_ASSERT(parameters.size() > 1); // Force copy of the src and internal id child vectors because we might modify them later. for (auto i = 0u; i < 2; i++) { auto& parameter = parameters[i]; diff --git a/src/function/table/bm_info.cpp b/src/function/table/bm_info.cpp index 1453953418..8ada96f10e 100644 --- a/src/function/table/bm_info.cpp +++ b/src/function/table/bm_info.cpp @@ -22,7 +22,7 @@ struct BMInfoBindData final : TableFuncBindData { static common::offset_t internalTableFunc(const TableFuncMorsel& /*morsel*/, const TableFuncInput& input, common::DataChunk& output) { - KU_ASSERT(output.getNumValueVectors() == 2); + RYU_ASSERT(output.getNumValueVectors() == 2); auto bmInfoBindData = input.bindData->constPtrCast(); output.getValueVectorMutable(0).setValue(0, bmInfoBindData->memLimit); output.getValueVectorMutable(1).setValue(0, bmInfoBindData->memUsage); diff --git a/src/function/table/cache_column.cpp b/src/function/table/cache_column.cpp index 442d376a13..fb958b14c4 100644 --- a/src/function/table/cache_column.cpp +++ b/src/function/table/cache_column.cpp @@ -66,7 +66,7 @@ struct CacheArrayColumnSharedState final : public SimpleTableFuncSharedState { void merge(node_group_idx_t nodeGroupIdx, std::unique_ptr columnChunkData) { std::unique_lock lck{mtx}; - KU_ASSERT(cachedColumn->columnChunks.size() > nodeGroupIdx); + RYU_ASSERT(cachedColumn->columnChunks.size() > nodeGroupIdx); cachedColumn->columnChunks[nodeGroupIdx] = std::move(columnChunkData); ++numNodeGroupsCached; } diff --git a/src/function/table/file_info.cpp b/src/function/table/file_info.cpp index a0781021f3..87ab10cc99 100644 --- a/src/function/table/file_info.cpp +++ b/src/function/table/file_info.cpp @@ -20,7 +20,7 @@ struct FileInfoBindData final : TableFuncBindData { static common::offset_t internalTableFunc(const TableFuncMorsel& /*morsel*/, const TableFuncInput& input, common::DataChunk& output) { - KU_ASSERT(output.getNumValueVectors() == 1); + RYU_ASSERT(output.getNumValueVectors() == 1); auto fileInfoBindData = input.bindData->constPtrCast(); output.getValueVectorMutable(0).setValue(0, fileInfoBindData->numPages); return 1; diff --git a/src/function/table/project_cypher_graph.cpp b/src/function/table/project_cypher_graph.cpp index db9891bdb3..51844a069e 100644 --- a/src/function/table/project_cypher_graph.cpp +++ b/src/function/table/project_cypher_graph.cpp @@ -31,7 +31,7 @@ static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput&) { graphEntrySet->validateGraphNotExist(bindData->graphName); // bind graph entry to check if input is valid or not. Ignore bind result. auto parsedStatements = parser::Parser::parseQuery(bindData->cypherQuery); - KU_ASSERT(parsedStatements.size() == 1); + RYU_ASSERT(parsedStatements.size() == 1); auto binder = binder::Binder(input.context->clientContext); binder.bind(*parsedStatements[0]); auto entry = std::make_unique(bindData->cypherQuery); diff --git a/src/function/table/projected_graph_info.cpp b/src/function/table/projected_graph_info.cpp index b558fb5f3d..bf1d672844 100644 --- a/src/function/table/projected_graph_info.cpp +++ b/src/function/table/projected_graph_info.cpp @@ -93,7 +93,7 @@ static offset_t internalTableFunc(const TableFuncMorsel& morsel, const TableFunc return 1; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -121,7 +121,7 @@ static std::unique_ptr bindFunc(const ClientContext* context, returnTypes.emplace_back(LogicalType::STRING()); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } returnColumnNames = @@ -148,7 +148,7 @@ static std::unique_ptr bindFunc(const ClientContext* context, projectedGraphInfo = std::make_unique(std::move(tableInfo)); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return std::make_unique(std::move(columns), graphEntry->type, std::move(projectedGraphInfo)); diff --git a/src/function/table/simple_table_function.cpp b/src/function/table/simple_table_function.cpp index 4b028e11d3..92c76d3347 100644 --- a/src/function/table/simple_table_function.cpp +++ b/src/function/table/simple_table_function.cpp @@ -7,7 +7,7 @@ namespace function { TableFuncMorsel SimpleTableFuncSharedState::getMorsel() { std::lock_guard lck{mtx}; - KU_ASSERT(curRowIdx <= numRows); + RYU_ASSERT(curRowIdx <= numRows); if (curRowIdx == numRows) { return TableFuncMorsel::createInvalidMorsel(); } diff --git a/src/function/table/stats_info.cpp b/src/function/table/stats_info.cpp index 91abafe470..8d99e0a536 100644 --- a/src/function/table/stats_info.cpp +++ b/src/function/table/stats_info.cpp @@ -44,7 +44,7 @@ static offset_t internalTableFunc(const TableFuncMorsel& /*morsel*/, const Table } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return 1; diff --git a/src/function/table/storage_info.cpp b/src/function/table/storage_info.cpp index 9793fe631e..19f06ee118 100644 --- a/src/function/table/storage_info.cpp +++ b/src/function/table/storage_info.cpp @@ -89,7 +89,7 @@ static void appendStorageInfoForChunkData(StorageInfoLocalState* localState, Dat metadata = chunkData.getMetadata(); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } auto& columnType = chunkData.getDataType(); @@ -224,7 +224,7 @@ static void appendStorageInfoForNodeGroup(StorageInfoLocalState* localState, Dat static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput& output) { auto& dataChunk = output.dataChunk; auto localState = ku_dynamic_cast(input.localState); - KU_ASSERT(dataChunk.state->getSelVector().isUnfiltered()); + RYU_ASSERT(dataChunk.state->getSelVector().isUnfiltered()); auto storageManager = StorageManager::Get(*input.context->clientContext); while (true) { if (localState->currChunkIdx < localState->dataChunkCollection->getNumChunks()) { @@ -294,7 +294,7 @@ static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput& output) } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } localState->dataChunkCollection->append(dataChunk); diff --git a/src/function/table/table_info.cpp b/src/function/table/table_info.cpp index 3d90b26cea..624e44dbf5 100644 --- a/src/function/table/table_info.cpp +++ b/src/function/table/table_info.cpp @@ -191,7 +191,7 @@ static std::unique_ptr bindFunc(const main::ClientContext* co type = CatalogEntryType::REL_GROUP_ENTRY; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } else { throw CatalogException(stringFormat("{} does not exist in catalog.", tableName)); diff --git a/src/function/union/union_value_function.cpp b/src/function/union/union_value_function.cpp index af376845cd..85d6604ee1 100644 --- a/src/function/union/union_value_function.cpp +++ b/src/function/union/union_value_function.cpp @@ -7,7 +7,7 @@ namespace ryu { namespace function { static std::unique_ptr bindFunc(const ScalarBindFuncInput& input) { - KU_ASSERT(input.arguments.size() == 1); + RYU_ASSERT(input.arguments.size() == 1); std::vector fields; if (input.arguments[0]->getDataType().getLogicalTypeID() == common::LogicalTypeID::ANY) { input.arguments[0]->cast(LogicalType::STRING()); @@ -26,7 +26,7 @@ static void execFunc(const std::vector>&, static void valueCompileFunc(FunctionBindData* /*bindData*/, const std::vector>& parameters, std::shared_ptr& result) { - KU_ASSERT(parameters.size() == 1); + RYU_ASSERT(parameters.size() == 1); result->setState(parameters[0]->state); UnionVector::getTagVector(result.get())->setState(parameters[0]->state); UnionVector::referenceVector(result.get(), UnionType::TAG_FIELD_IDX, parameters[0]); diff --git a/src/function/utility/coalesce.cpp b/src/function/utility/coalesce.cpp index a37954b4de..a038a439b5 100644 --- a/src/function/utility/coalesce.cpp +++ b/src/function/utility/coalesce.cpp @@ -48,7 +48,7 @@ static void execFunc(const std::vector>& pa static bool selectFunc(const std::vector>& params, SelectionVector& selVector, void* /* dataPtr */) { - KU_ASSERT(!params.empty()); + RYU_ASSERT(!params.empty()); auto unFlatVectorIdx = 0u; for (auto i = 0u; i < params.size(); ++i) { if (!params[i]->state->isFlat()) { diff --git a/src/function/utility/constant_or_null.cpp b/src/function/utility/constant_or_null.cpp index cbf13a8eea..da5c949bb3 100644 --- a/src/function/utility/constant_or_null.cpp +++ b/src/function/utility/constant_or_null.cpp @@ -23,7 +23,7 @@ static std::unique_ptr bindFunc(const ScalarBindFuncInput& inp static void execFunc(const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); result.resetAuxiliaryBuffer(); for (auto i = 0u; i < resultSelVector->getSelSize(); ++i) { auto resultPos = (*resultSelVector)[i]; @@ -40,7 +40,7 @@ static void execFunc(const std::vector>& pa static bool selectFunc(const std::vector>& params, SelectionVector& selVector, void* /* dataPtr */) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); auto unFlatVectorIdx = 0u; for (auto i = 0u; i < params.size(); ++i) { if (!params[i]->state->isFlat()) { diff --git a/src/function/utility/count_if.cpp b/src/function/utility/count_if.cpp index 94b6cf5bb8..ff12584d11 100644 --- a/src/function/utility/count_if.cpp +++ b/src/function/utility/count_if.cpp @@ -30,7 +30,7 @@ function_set CountIfFunction::getFunctionSet() { T) { execFunc = ScalarFunction::UnaryExecFunction; }, [&execFunc]( bool) { execFunc = ScalarFunction::UnaryExecFunction; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); functionSet.push_back(std::make_unique(name, std::vector{operandTypeID}, LogicalTypeID::UINT8, execFunc)); } diff --git a/src/function/utility/nullif.cpp b/src/function/utility/nullif.cpp index 4ada04a49a..044fc656eb 100644 --- a/src/function/utility/nullif.cpp +++ b/src/function/utility/nullif.cpp @@ -11,7 +11,7 @@ namespace ryu { namespace function { static std::shared_ptr rewriteFunc(const RewriteFunctionBindInput& input) { - KU_ASSERT(input.arguments.size() == 2); + RYU_ASSERT(input.arguments.size() == 2); auto uniqueExpressionName = ScalarFunctionExpression::getUniqueName(NullIfFunction::name, input.arguments); const auto& resultType = input.arguments[0]->getDataType(); diff --git a/src/function/vector_arithmetic_functions.cpp b/src/function/vector_arithmetic_functions.cpp index 091883149a..9d44516d1e 100644 --- a/src/function/vector_arithmetic_functions.cpp +++ b/src/function/vector_arithmetic_functions.cpp @@ -56,7 +56,7 @@ static std::unique_ptr getUnaryFunction(std::string name, common::TypeUtils::visit( LogicalType(operandTypeID), [&](T) { execFunc = ScalarFunction::UnaryExecFunction; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return std::make_unique(std::move(name), std::vector{operandTypeID}, operandTypeID, execFunc); } @@ -77,7 +77,7 @@ static std::unique_ptr getBinaryFunction(std::string name, common::LogicalType(operandTypeID), [&]( T) { execFunc = ScalarFunction::BinaryExecFunction; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return std::make_unique(std::move(name), std::vector{operandTypeID, operandTypeID}, operandTypeID, execFunc); } @@ -688,7 +688,7 @@ static void getBinaryExecutionHelperB(const LogicalType& typeR, scalar_func_exec result = ScalarFunction::BinaryStringExecFunction; break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -710,7 +710,7 @@ static void getBinaryExecutionHelperA(const LogicalType& typeB, const LogicalTyp getBinaryExecutionHelperB(typeR, result); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -718,7 +718,7 @@ template static std::unique_ptr genericBinaryArithmeticFunc( const binder::expression_vector& arguments, Function* func) { auto asScalar = ku_dynamic_cast(func); - KU_ASSERT(asScalar != nullptr); + RYU_ASSERT(asScalar != nullptr); auto argADataType = arguments[0]->getDataType().copy(); auto argBDataType = arguments[1]->getDataType().copy(); if (argADataType.getLogicalTypeID() != LogicalTypeID::DECIMAL) { @@ -743,7 +743,7 @@ static std::unique_ptr genericBinaryArithmeticFunc( [&](T) { asScalar->execFunc = ScalarFunction::BinaryStringExecFunction; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } else { common::TypeUtils::visit( argumentAType.getPhysicalType(), @@ -751,7 +751,7 @@ static std::unique_ptr genericBinaryArithmeticFunc( getBinaryExecutionHelperA(argumentBType, resultingType, asScalar->execFunc); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } std::vector resVec; resVec.push_back(std::move(argumentAType)); @@ -776,7 +776,7 @@ static void getUnaryExecutionHelper(const LogicalType& resultType, scalar_func_e result = ScalarFunction::UnaryExecNestedTypeFunction; break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -784,7 +784,7 @@ template static std::unique_ptr genericUnaryArithmeticFunc( const binder::expression_vector& arguments, Function* func) { auto asScalar = ku_dynamic_cast(func); - KU_ASSERT(asScalar != nullptr); + RYU_ASSERT(asScalar != nullptr); auto argPrecision = DecimalType::getPrecision(arguments[0]->getDataType()); auto argScale = DecimalType::getScale(arguments[0]->getDataType()); auto params = FUNC::resultingParams(argPrecision, argScale); @@ -810,7 +810,7 @@ static std::unique_ptr genericUnaryArithmeticFunc( ScalarFunction::UnaryExecNestedTypeFunction; break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } else { switch (argumentType.getPhysicalType()) { @@ -827,7 +827,7 @@ static std::unique_ptr genericUnaryArithmeticFunc( getUnaryExecutionHelper(resultingType, asScalar->execFunc); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } std::vector argTypes; diff --git a/src/function/vector_boolean_functions.cpp b/src/function/vector_boolean_functions.cpp index f0d812236a..7e7a8758b8 100644 --- a/src/function/vector_boolean_functions.cpp +++ b/src/function/vector_boolean_functions.cpp @@ -13,7 +13,7 @@ void VectorBooleanFunction::bindExecFunction(ExpressionType expressionType, if (ExpressionTypeUtil::isBinary(expressionType)) { bindBinaryExecFunction(expressionType, children, func); } else { - KU_ASSERT(ExpressionTypeUtil::isUnary(expressionType)); + RYU_ASSERT(ExpressionTypeUtil::isUnary(expressionType)); bindUnaryExecFunction(expressionType, children, func); } } @@ -23,19 +23,19 @@ void VectorBooleanFunction::bindSelectFunction(ExpressionType expressionType, if (ExpressionTypeUtil::isBinary(expressionType)) { bindBinarySelectFunction(expressionType, children, func); } else { - KU_ASSERT(ExpressionTypeUtil::isUnary(expressionType)); + RYU_ASSERT(ExpressionTypeUtil::isUnary(expressionType)); bindUnarySelectFunction(expressionType, children, func); } } void VectorBooleanFunction::bindBinaryExecFunction(ExpressionType expressionType, const binder::expression_vector& children, scalar_func_exec_t& func) { - KU_ASSERT(children.size() == 2); + RYU_ASSERT(children.size() == 2); const auto& leftType = children[0]->dataType; const auto& rightType = children[1]->dataType; (void)leftType; (void)rightType; - KU_ASSERT(leftType.getLogicalTypeID() == LogicalTypeID::BOOL && + RYU_ASSERT(leftType.getLogicalTypeID() == LogicalTypeID::BOOL && rightType.getLogicalTypeID() == LogicalTypeID::BOOL); switch (expressionType) { case ExpressionType::AND: { @@ -59,12 +59,12 @@ void VectorBooleanFunction::bindBinaryExecFunction(ExpressionType expressionType void VectorBooleanFunction::bindBinarySelectFunction(ExpressionType expressionType, const binder::expression_vector& children, scalar_func_select_t& func) { - KU_ASSERT(children.size() == 2); + RYU_ASSERT(children.size() == 2); const auto& leftType = children[0]->dataType; const auto& rightType = children[1]->dataType; (void)leftType; (void)rightType; - KU_ASSERT(leftType.getLogicalTypeID() == LogicalTypeID::BOOL && + RYU_ASSERT(leftType.getLogicalTypeID() == LogicalTypeID::BOOL && rightType.getLogicalTypeID() == LogicalTypeID::BOOL); switch (expressionType) { case ExpressionType::AND: { @@ -88,7 +88,7 @@ void VectorBooleanFunction::bindBinarySelectFunction(ExpressionType expressionTy void VectorBooleanFunction::bindUnaryExecFunction(ExpressionType expressionType, const binder::expression_vector& children, scalar_func_exec_t& func) { - KU_ASSERT( + RYU_ASSERT( children.size() == 1 && children[0]->dataType.getLogicalTypeID() == LogicalTypeID::BOOL); (void)children; switch (expressionType) { @@ -105,7 +105,7 @@ void VectorBooleanFunction::bindUnaryExecFunction(ExpressionType expressionType, void VectorBooleanFunction::bindUnarySelectFunction(ExpressionType expressionType, const binder::expression_vector& children, scalar_func_select_t& func) { - KU_ASSERT( + RYU_ASSERT( children.size() == 1 && children[0]->dataType.getLogicalTypeID() == LogicalTypeID::BOOL); (void)children; switch (expressionType) { diff --git a/src/function/vector_cast_functions.cpp b/src/function/vector_cast_functions.cpp index 086838e098..8f4098da6f 100644 --- a/src/function/vector_cast_functions.cpp +++ b/src/function/vector_cast_functions.cpp @@ -155,7 +155,7 @@ static void nestedTypesCastExecFunction( const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void*) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); result.resetAuxiliaryBuffer(); const auto& inputVector = params[0]; const auto* inputVectorSelVector = paramSelVectors[0]; @@ -278,7 +278,7 @@ bool CastFunction::hasImplicitCast(const LogicalType& srcType, const LogicalType return hasImplicitCastMap(srcType, dstType); default: // LCOV_EXCL_START - KU_UNREACHABLE; + RYU_UNREACHABLE; // LCOV_EXCL_END } } else if (dstType.getLogicalTypeID() == LogicalTypeID::UNION) { @@ -372,7 +372,7 @@ static std::unique_ptr bindCastFromStringFunction(const std::str ScalarFunction::UnaryExecNestedTypeFunction; break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; case LogicalTypeID::INT128: { @@ -503,7 +503,7 @@ static std::unique_ptr bindCastToStringFunction(const std::strin ScalarFunction::UnaryExecNestedTypeFunction; break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; case LogicalTypeID::DATE: { @@ -571,7 +571,7 @@ static std::unique_ptr bindCastToStringFunction(const std::strin EXECUTOR>; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return std::make_unique(functionName, std::vector{sourceType.getLogicalTypeID()}, LogicalTypeID::STRING, func); @@ -588,14 +588,14 @@ static std::unique_ptr bindCastToDecimalFunction(const std::stri func = ScalarFunction::UnaryCastExecFunction; }, - [&](auto) { KU_UNREACHABLE; }); + [&](auto) { RYU_UNREACHABLE; }); } else { TypeUtils::visit( sourceType, [&](T) { func = ScalarFunction::UnaryCastExecFunction; }, - [&](auto) { KU_UNREACHABLE; }); + [&](auto) { RYU_UNREACHABLE; }); } return std::make_unique(functionName, std::vector{sourceType.getLogicalTypeID()}, targetType.getLogicalTypeID(), @@ -664,7 +664,7 @@ static std::unique_ptr bindCastToNumericFunction(const std::stri EXECUTOR>; break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; default: @@ -823,7 +823,7 @@ static std::unique_ptr bindCastBetweenDecimalFunction( func = ScalarFunction::UnaryExecNestedTypeFunction; break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return std::make_unique(functionName, std::vector{LogicalTypeID::DECIMAL}, LogicalTypeID::DECIMAL, func); @@ -857,7 +857,7 @@ std::unique_ptr CastFunction::bindCastFunction(const std::string scalarFunc = bindCastToDecimalFunction(functionName, sourceType, targetType); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return scalarFunc; } case LogicalTypeID::INT128: { @@ -1145,7 +1145,7 @@ function_set CastToUInt8Function::getFunctionSet() { } static std::unique_ptr castBindFunc(ScalarBindFuncInput input) { - KU_ASSERT(input.arguments.size() == 2); + RYU_ASSERT(input.arguments.size() == 2); // Bind target type. if (input.arguments[1]->expressionType != ExpressionType::LITERAL) { throw BinderException(stringFormat("Second parameter of CAST function must be a literal.")); diff --git a/src/function/vector_hash_functions.cpp b/src/function/vector_hash_functions.cpp index 53f4427b58..7191a0e7f6 100644 --- a/src/function/vector_hash_functions.cpp +++ b/src/function/vector_hash_functions.cpp @@ -77,12 +77,12 @@ static void validateSelState(const SelectionView& leftSelVec, const SelectionVie auto resultSelSize = resultSelVec.getSelSize(); (void)resultSelSize; if (leftSelSize > 1 && rightSelSize > 1) { - KU_ASSERT(leftSelSize == rightSelSize); - KU_ASSERT(leftSelSize == resultSelSize); + RYU_ASSERT(leftSelSize == rightSelSize); + RYU_ASSERT(leftSelSize == resultSelSize); } else if (leftSelSize > 1) { - KU_ASSERT(leftSelSize == resultSelSize); + RYU_ASSERT(leftSelSize == resultSelSize); } else if (rightSelSize > 1) { - KU_ASSERT(rightSelSize == resultSelSize); + RYU_ASSERT(rightSelSize == resultSelSize); } } @@ -173,12 +173,12 @@ static void computeStructVecHash(const ValueVector& operand, const SelectionView ValueVector& result, const SelectionView& resultSelVec) { switch (operand.dataType.getLogicalTypeID()) { case LogicalTypeID::NODE: { - KU_ASSERT(0 == common::StructType::getFieldIdx(operand.dataType, InternalKeyword::ID)); + RYU_ASSERT(0 == common::StructType::getFieldIdx(operand.dataType, InternalKeyword::ID)); UnaryHashFunctionExecutor::execute( *StructVector::getFieldVector(&operand, 0), operandSelVec, result, resultSelVec); } break; case LogicalTypeID::REL: { - KU_ASSERT(3 == StructType::getFieldIdx(operand.dataType, InternalKeyword::ID)); + RYU_ASSERT(3 == StructType::getFieldIdx(operand.dataType, InternalKeyword::ID)); UnaryHashFunctionExecutor::execute( *StructVector::getFieldVector(&operand, 3), operandSelVec, result, resultSelVec); } break; @@ -197,7 +197,7 @@ static void computeStructVecHash(const ValueVector& operand, const SelectionView } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -205,7 +205,7 @@ void VectorHashFunction::computeHash(const ValueVector& operand, const SelectionView& operandSelectVec, ValueVector& result, const SelectionView& resultSelectVec) { result.state = operand.state; - KU_ASSERT(result.dataType.getLogicalTypeID() == LogicalType::HASH().getLogicalTypeID()); + RYU_ASSERT(result.dataType.getLogicalTypeID() == LogicalType::HASH().getLogicalTypeID()); TypeUtils::visit( operand.dataType.getPhysicalType(), [&](T) { @@ -228,9 +228,9 @@ void VectorHashFunction::computeHash(const ValueVector& operand, void VectorHashFunction::combineHash(const ValueVector& left, const SelectionView& leftSelVec, const ValueVector& right, const SelectionView& rightSelVec, ValueVector& result, const SelectionView& resultSelVec) { - KU_ASSERT(left.dataType.getLogicalTypeID() == LogicalType::HASH().getLogicalTypeID()); - KU_ASSERT(left.dataType.getLogicalTypeID() == right.dataType.getLogicalTypeID()); - KU_ASSERT(left.dataType.getLogicalTypeID() == result.dataType.getLogicalTypeID()); + RYU_ASSERT(left.dataType.getLogicalTypeID() == LogicalType::HASH().getLogicalTypeID()); + RYU_ASSERT(left.dataType.getLogicalTypeID() == right.dataType.getLogicalTypeID()); + RYU_ASSERT(left.dataType.getLogicalTypeID() == result.dataType.getLogicalTypeID()); BinaryHashFunctionExecutor::execute(left, leftSelVec, right, rightSelVec, result, resultSelVec); } @@ -238,7 +238,7 @@ void VectorHashFunction::combineHash(const ValueVector& left, const SelectionVie static void HashExecFunc(const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector*, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); // TODO(Ziyi): evaluators should resolve the state for result vector. result.state = params[0]->state; VectorHashFunction::computeHash(*params[0], *paramSelVectors[0], result, diff --git a/src/function/vector_node_rel_functions.cpp b/src/function/vector_node_rel_functions.cpp index 5675e6f116..5ce176e2a3 100644 --- a/src/function/vector_node_rel_functions.cpp +++ b/src/function/vector_node_rel_functions.cpp @@ -13,7 +13,7 @@ namespace function { static void execFunc(const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); UnaryFunctionExecutor::execute(*params[0], paramSelVectors[0], result, resultSelVector); } diff --git a/src/function/vector_null_functions.cpp b/src/function/vector_null_functions.cpp index 4e012ce95f..f389b06340 100644 --- a/src/function/vector_null_functions.cpp +++ b/src/function/vector_null_functions.cpp @@ -28,7 +28,7 @@ void VectorNullFunction::bindExecFunction(ExpressionType expressionType, void VectorNullFunction::bindSelectFunction(ExpressionType expressionType, const binder::expression_vector& children, scalar_func_select_t& func) { - KU_ASSERT(children.size() == 1); + RYU_ASSERT(children.size() == 1); (void)children; switch (expressionType) { case ExpressionType::IS_NULL: { diff --git a/src/graph/graph.cpp b/src/graph/graph.cpp index f07adda48e..4656284857 100644 --- a/src/graph/graph.cpp +++ b/src/graph/graph.cpp @@ -7,12 +7,12 @@ NbrScanState::Chunk::Chunk(std::span nbrNodes, common::SelectionVector& selVector, std::span> propertyVectors) : nbrNodes{nbrNodes}, selVector{selVector}, propertyVectors{propertyVectors} { - KU_ASSERT(nbrNodes.size() == common::DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(nbrNodes.size() == common::DEFAULT_VECTOR_CAPACITY); } VertexScanState::Chunk::Chunk(std::span nodeIDs, std::span> propertyVectors) : nodeIDs{nodeIDs}, propertyVectors{propertyVectors} { - KU_ASSERT(nodeIDs.size() <= common::DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(nodeIDs.size() <= common::DEFAULT_VECTOR_CAPACITY); } } // namespace ryu::graph diff --git a/src/graph/on_disk_graph.cpp b/src/graph/on_disk_graph.cpp index 7f5d01c1aa..a805e982ad 100644 --- a/src/graph/on_disk_graph.cpp +++ b/src/graph/on_disk_graph.cpp @@ -92,7 +92,7 @@ OnDiskGraphNbrScanState::OnDiskGraphNbrScanState(ClientContext* context, auto schema = getSchema(predicateProps); auto mm = MemoryManager::Get(*context); auto resultSet = getResultSet(&schema, mm); - KU_ASSERT(resultSet.dataChunks.size() == 1); + RYU_ASSERT(resultSet.dataChunks.size() == 1); auto state = resultSet.getDataChunk(0)->state; srcNodeIDVector = getValueVector(LogicalType::INTERNAL_ID(), mm, state); srcNodeIDVector->state = DataChunkState::getSingleValueDataChunkState(); @@ -107,7 +107,7 @@ OnDiskGraphNbrScanState::OnDiskGraphNbrScanState(ClientContext* context, auto propertyName = relProperties[i]; auto& property = entry.getProperty(propertyName); relPropertyColumnIDs[i] = entry.getColumnID(propertyName); - KU_ASSERT(relPropertyColumnIDs[i] != INVALID_COLUMN_ID); + RYU_ASSERT(relPropertyColumnIDs[i] != INVALID_COLUMN_ID); propertyVectors.valueVectors[i] = getValueVector(property.getType(), mm, state); } if (predicate != nullptr) { @@ -166,7 +166,7 @@ table_id_map_t OnDiskGraph::getMaxOffsetMap(transaction::Transaction* } offset_t OnDiskGraph::getMaxOffset(transaction::Transaction* transaction, table_id_t id) const { - KU_ASSERT(nodeIDToNodeTable.contains(id)); + RYU_ASSERT(nodeIDToNodeTable.contains(id)); return nodeIDToNodeTable.at(id)->getNumTotalRows(transaction); } @@ -275,13 +275,13 @@ void OnDiskGraphNbrScanState::InnerIterator::initScan() const { void OnDiskGraphNbrScanState::startScan(RelDataDirection direction) { auto idx = RelDirectionUtils::relDirectionToKeyIdx(direction); - KU_ASSERT(idx < directedIterators.size() && directedIterators[idx].getDirection() == direction); + RYU_ASSERT(idx < directedIterators.size() && directedIterators[idx].getDirection() == direction); currentIter = &directedIterators[idx]; currentIter->initScan(); } bool OnDiskGraphNbrScanState::next() { - KU_ASSERT(currentIter != nullptr); + RYU_ASSERT(currentIter != nullptr); if (currentIter->next(relPredicateEvaluator.get(), nbrNodeMask)) { return true; } diff --git a/src/graph/parsed_graph_entry.cpp b/src/graph/parsed_graph_entry.cpp index ce4b84f6f4..fba37cbbac 100644 --- a/src/graph/parsed_graph_entry.cpp +++ b/src/graph/parsed_graph_entry.cpp @@ -12,7 +12,7 @@ std::string GraphEntryTypeUtils::toString(GraphEntryType type) { case GraphEntryType::CYPHER: return "CYPHER"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/include/binder/binder_scope.h b/src/include/binder/binder_scope.h index aeb8fac5bb..4a71b4d312 100644 --- a/src/include/binder/binder_scope.h +++ b/src/include/binder/binder_scope.h @@ -15,7 +15,7 @@ class BinderScope { bool empty() const { return expressions.empty(); } bool contains(const std::string& varName) const { return nameToExprIdx.contains(varName); } std::shared_ptr getExpression(const std::string& varName) const { - KU_ASSERT(nameToExprIdx.contains(varName)); + RYU_ASSERT(nameToExprIdx.contains(varName)); return expressions[nameToExprIdx.at(varName)]; } expression_vector getExpressions() const { return expressions; } @@ -31,7 +31,7 @@ class BinderScope { return memorizedNodeNameToEntries.contains(name); } std::vector getMemorizedTableEntries(const std::string& name) { - KU_ASSERT(memorizedNodeNameToEntries.contains(name)); + RYU_ASSERT(memorizedNodeNameToEntries.contains(name)); return memorizedNodeNameToEntries.at(name); } @@ -42,7 +42,7 @@ class BinderScope { return nodeReplacement.contains(name); } std::shared_ptr getNodeReplacement(const std::string& name) const { - KU_ASSERT(hasNodeReplacement(name)); + RYU_ASSERT(hasNodeReplacement(name)); return nodeReplacement.at(name); } diff --git a/src/include/binder/bound_statement_result.h b/src/include/binder/bound_statement_result.h index 88e8ea1ea9..00ead13d5e 100644 --- a/src/include/binder/bound_statement_result.h +++ b/src/include/binder/bound_statement_result.h @@ -32,7 +32,7 @@ class BoundStatementResult { } std::shared_ptr getSingleColumnExpr() const { - KU_ASSERT(columns.size() == 1); + RYU_ASSERT(columns.size() == 1); return columns[0]; } diff --git a/src/include/binder/ddl/bound_create_table.h b/src/include/binder/ddl/bound_create_table.h index d3aaa1edae..b95eff7f25 100644 --- a/src/include/binder/ddl/bound_create_table.h +++ b/src/include/binder/ddl/bound_create_table.h @@ -19,7 +19,7 @@ class BoundCreateTable final : public BoundStatement { void setCopyInfo(BoundCopyFromInfo copyInfo_) { copyInfo = std::move(copyInfo_); } bool hasCopyInfo() const { return copyInfo.has_value(); } const BoundCopyFromInfo& getCopyInfo() const { - KU_ASSERT(copyInfo.has_value()); + RYU_ASSERT(copyInfo.has_value()); return copyInfo.value(); } diff --git a/src/include/binder/expression/expression.h b/src/include/binder/expression/expression.h index 924622cf91..17a28eb515 100644 --- a/src/include/binder/expression/expression.h +++ b/src/include/binder/expression/expression.h @@ -56,7 +56,7 @@ class RYU_API Expression : public std::enable_shared_from_this { void setUniqueName(const std::string& name) { uniqueName = name; } std::string getUniqueName() const { - KU_ASSERT(!uniqueName.empty()); + RYU_ASSERT(!uniqueName.empty()); return uniqueName; } @@ -69,12 +69,12 @@ class RYU_API Expression : public std::enable_shared_from_this { common::idx_t getNumChildren() const { return children.size(); } std::shared_ptr getChild(common::idx_t idx) const { - KU_ASSERT(idx < children.size()); + RYU_ASSERT(idx < children.size()); return children[idx]; } expression_vector getChildren() const { return children; } void setChild(common::idx_t idx, std::shared_ptr child) { - KU_ASSERT(idx < children.size()); + RYU_ASSERT(idx < children.size()); children[idx] = std::move(child); } diff --git a/src/include/binder/expression/lambda_expression.h b/src/include/binder/expression/lambda_expression.h index aea18a65a7..2d4e762753 100644 --- a/src/include/binder/expression/lambda_expression.h +++ b/src/include/binder/expression/lambda_expression.h @@ -16,7 +16,7 @@ class LambdaExpression final : public Expression { parsedLambdaExpr{std::move(parsedLambdaExpr)} {} void cast(const common::LogicalType& type_) override { - KU_ASSERT(dataType.getLogicalTypeID() == common::LogicalTypeID::ANY); + RYU_ASSERT(dataType.getLogicalTypeID() == common::LogicalTypeID::ANY); dataType = type_.copy(); } diff --git a/src/include/binder/expression/node_expression.h b/src/include/binder/expression/node_expression.h index 50fede1d06..267f8fbfcb 100644 --- a/src/include/binder/expression/node_expression.h +++ b/src/include/binder/expression/node_expression.h @@ -18,7 +18,7 @@ class RYU_API NodeExpression final : public NodeOrRelExpression { void setInternalID(std::shared_ptr expr) { internalID = std::move(expr); } std::shared_ptr getInternalID() const override { - KU_ASSERT(internalID != nullptr); + RYU_ASSERT(internalID != nullptr); return internalID; } diff --git a/src/include/binder/expression/node_rel_expression.h b/src/include/binder/expression/node_rel_expression.h index 458f51de39..122cb7abc0 100644 --- a/src/include/binder/expression/node_rel_expression.h +++ b/src/include/binder/expression/node_rel_expression.h @@ -48,7 +48,7 @@ class RYU_API NodeOrRelExpression : public Expression { } std::shared_ptr getPropertyExpression( const std::string& propertyName) const { - KU_ASSERT(propertyNameToIdx.contains(propertyName)); + RYU_ASSERT(propertyNameToIdx.contains(propertyName)); return propertyExprs[propertyNameToIdx.at(propertyName)]; } virtual std::shared_ptr getInternalID() const = 0; @@ -71,7 +71,7 @@ class RYU_API NodeOrRelExpression : public Expression { return propertyDataExprs.contains(propertyName); } std::shared_ptr getPropertyDataExpr(const std::string& propertyName) const { - KU_ASSERT(propertyDataExprs.contains(propertyName)); + RYU_ASSERT(propertyDataExprs.contains(propertyName)); return propertyDataExprs.at(propertyName); } diff --git a/src/include/binder/expression/rel_expression.h b/src/include/binder/expression/rel_expression.h index 749c2a66b4..e9103a44dc 100644 --- a/src/include/binder/expression/rel_expression.h +++ b/src/include/binder/expression/rel_expression.h @@ -88,7 +88,7 @@ class RYU_API RelExpression final : public NodeOrRelExpression { } const RecursiveInfo* getRecursiveInfo() const { return recursiveInfo.get(); } std::shared_ptr getLengthExpression() const { - KU_ASSERT(recursiveInfo != nullptr); + RYU_ASSERT(recursiveInfo != nullptr); return recursiveInfo->bindData->lengthExpr; } diff --git a/src/include/binder/query/normalized_query_part.h b/src/include/binder/query/normalized_query_part.h index 52f7278486..d3b251bfc8 100644 --- a/src/include/binder/query/normalized_query_part.h +++ b/src/include/binder/query/normalized_query_part.h @@ -37,11 +37,11 @@ class NormalizedQueryPart { } bool hasProjectionBody() const { return projectionBody.has_value(); } BoundProjectionBody* getProjectionBodyUnsafe() { - KU_ASSERT(projectionBody.has_value()); + RYU_ASSERT(projectionBody.has_value()); return &projectionBody.value(); } const BoundProjectionBody* getProjectionBody() const { - KU_ASSERT(projectionBody.has_value()); + RYU_ASSERT(projectionBody.has_value()); return &projectionBody.value(); } diff --git a/src/include/catalog/catalog_entry/catalog_entry.h b/src/include/catalog/catalog_entry/catalog_entry.h index 6cd1c1c0ad..8ddc6c64ff 100644 --- a/src/include/catalog/catalog_entry/catalog_entry.h +++ b/src/include/catalog/catalog_entry/catalog_entry.h @@ -51,7 +51,7 @@ class RYU_API CatalogEntry { void setOID(common::oid_t oid) { this->oid = oid; } common::oid_t getOID() const { return oid; } CatalogEntry* getPrev() const { - KU_ASSERT(prev); + RYU_ASSERT(prev); return prev.get(); } std::unique_ptr movePrev() { @@ -75,7 +75,7 @@ class RYU_API CatalogEntry { virtual void serialize(common::Serializer& serializer) const; static std::unique_ptr deserialize(common::Deserializer& deserializer); - virtual std::string toCypher(const ToCypherInfo& /*info*/) const { KU_UNREACHABLE; } + virtual std::string toCypher(const ToCypherInfo& /*info*/) const { RYU_UNREACHABLE; } template TARGET& cast() { diff --git a/src/include/catalog/catalog_entry/dummy_catalog_entry.h b/src/include/catalog/catalog_entry/dummy_catalog_entry.h index b4c3fbdc2e..fd744f5376 100644 --- a/src/include/catalog/catalog_entry/dummy_catalog_entry.h +++ b/src/include/catalog/catalog_entry/dummy_catalog_entry.h @@ -14,8 +14,8 @@ class DummyCatalogEntry final : public CatalogEntry { setOID(oid); } - void serialize(common::Serializer& /*serializer*/) const override { KU_UNREACHABLE; } - std::string toCypher(const ToCypherInfo& /*info*/) const override { KU_UNREACHABLE; } + void serialize(common::Serializer& /*serializer*/) const override { RYU_UNREACHABLE; } + std::string toCypher(const ToCypherInfo& /*info*/) const override { RYU_UNREACHABLE; } }; } // namespace catalog diff --git a/src/include/catalog/catalog_entry/function_catalog_entry.h b/src/include/catalog/catalog_entry/function_catalog_entry.h index 348cb4b436..d148b00106 100644 --- a/src/include/catalog/catalog_entry/function_catalog_entry.h +++ b/src/include/catalog/catalog_entry/function_catalog_entry.h @@ -25,7 +25,7 @@ class RYU_API FunctionCatalogEntry : public CatalogEntry { //===--------------------------------------------------------------------===// // We always register functions while initializing the catalog, so we don't have to // serialize functions. - void serialize(common::Serializer& /*serializer*/) const override { KU_UNREACHABLE; } + void serialize(common::Serializer& /*serializer*/) const override { RYU_UNREACHABLE; } protected: function::function_set functionSet; diff --git a/src/include/catalog/catalog_entry/table_catalog_entry.h b/src/include/catalog/catalog_entry/table_catalog_entry.h index ae656f495b..2a4ce685c8 100644 --- a/src/include/catalog/catalog_entry/table_catalog_entry.h +++ b/src/include/catalog/catalog_entry/table_catalog_entry.h @@ -41,7 +41,7 @@ class RYU_API TableCatalogEntry : public CatalogEntry { std::string getComment() const { return comment; } void setComment(std::string newComment) { comment = std::move(newComment); } - virtual function::TableFunction getScanFunction() { KU_UNREACHABLE; } + virtual function::TableFunction getScanFunction() { RYU_UNREACHABLE; } common::column_id_t getMaxColumnID() const; void vacuumColumnIDs(common::column_id_t nextColumnID); diff --git a/src/include/common/assert.h b/src/include/common/assert.h index 0b0727d388..8aa9a72172 100644 --- a/src/include/common/assert.h +++ b/src/include/common/assert.h @@ -6,7 +6,7 @@ namespace ryu { namespace common { -[[noreturn]] inline void kuAssertFailureInternal(const char* condition_name, const char* file, +[[noreturn]] inline void ryuAssertFailureInternal(const char* condition_name, const char* file, int linenr) { // LCOV_EXCL_START throw InternalException(stringFormat("Assertion failed in file \"{}\" on line {}: {}", file, @@ -14,23 +14,23 @@ namespace common { // LCOV_EXCL_STOP } -#define KU_ASSERT_UNCONDITIONAL(condition) \ +#define RYU_ASSERT_UNCONDITIONAL(condition) \ static_cast(condition) ? \ void(0) : \ - ryu::common::kuAssertFailureInternal(#condition, __FILE__, __LINE__) + ryu::common::ryuAssertFailureInternal(#condition, __FILE__, __LINE__) #if defined(RYU_RUNTIME_CHECKS) || !defined(NDEBUG) #define RUNTIME_CHECK(code) code -#define KU_ASSERT(condition) KU_ASSERT_UNCONDITIONAL(condition) +#define RYU_ASSERT(condition) RYU_ASSERT_UNCONDITIONAL(condition) #else -#define KU_ASSERT(condition) void(0) +#define RYU_ASSERT(condition) void(0) #define RUNTIME_CHECK(code) void(0) #endif -#define KU_UNREACHABLE \ - /* LCOV_EXCL_START */ [[unlikely]] ryu::common::kuAssertFailureInternal("KU_UNREACHABLE", \ +#define RYU_UNREACHABLE \ + /* LCOV_EXCL_START */ [[unlikely]] ryu::common::ryuAssertFailureInternal("RYU_UNREACHABLE", \ __FILE__, __LINE__) /* LCOV_EXCL_STOP */ -#define KU_UNUSED(expr) (void)(expr) +#define RYU_UNUSED(expr) (void)(expr) } // namespace common } // namespace ryu diff --git a/src/include/common/cast.h b/src/include/common/cast.h index ea1d7143a1..8344fb342b 100644 --- a/src/include/common/cast.h +++ b/src/include/common/cast.h @@ -12,7 +12,7 @@ TO ku_dynamic_cast(FROM* old) { #if defined(RYU_RUNTIME_CHECKS) || !defined(NDEBUG) static_assert(std::is_pointer()); TO newVal = dynamic_cast(old); - KU_ASSERT(newVal != nullptr); + RYU_ASSERT(newVal != nullptr); return newVal; #else return reinterpret_cast(old); @@ -27,7 +27,7 @@ TO ku_dynamic_cast(FROM& old) { TO newVal = dynamic_cast(old); return newVal; } catch (std::bad_cast& e) { - KU_ASSERT(false); + RYU_ASSERT(false); } #else return reinterpret_cast(old); diff --git a/src/include/common/concurrent_vector.h b/src/include/common/concurrent_vector.h index d6b9e060ec..245e20a5b4 100644 --- a/src/include/common/concurrent_vector.h +++ b/src/include/common/concurrent_vector.h @@ -46,7 +46,7 @@ class ConcurrentVector { index->blocks[index->numBlocks] = newBlock.get(); index->numBlocks++; } else { - KU_ASSERT(indices.back()->numBlocks == INDEX_SIZE); + RYU_ASSERT(indices.back()->numBlocks == INDEX_SIZE); auto index = std::make_unique(); index->blocks[0] = newBlock.get(); index->numBlocks = 1; @@ -66,20 +66,20 @@ class ConcurrentVector { T& operator[](uint64_t elemPos) { if (elemPos < initialBlockSize) { - KU_ASSERT(initialBlock); + RYU_ASSERT(initialBlock); return initialBlock[elemPos]; } else { auto blockNum = (elemPos - initialBlockSize) / BLOCK_SIZE; auto posInBlock = (elemPos - initialBlockSize) % BLOCK_SIZE; auto indexNum = blockNum / INDEX_SIZE; BlockIndex* index = firstIndex; - KU_ASSERT(index != nullptr); + RYU_ASSERT(index != nullptr); while (indexNum > 0) { - KU_ASSERT(index->nextIndex != nullptr); + RYU_ASSERT(index->nextIndex != nullptr); index = index->nextIndex; indexNum--; } - KU_ASSERT(index->blocks[blockNum % INDEX_SIZE] != nullptr); + RYU_ASSERT(index->blocks[blockNum % INDEX_SIZE] != nullptr); return index->blocks[blockNum % INDEX_SIZE]->data[posInBlock]; } } diff --git a/src/include/common/copier_config/file_scan_info.h b/src/include/common/copier_config/file_scan_info.h index 0506af5376..ad4a5d9e5b 100644 --- a/src/include/common/copier_config/file_scan_info.h +++ b/src/include/common/copier_config/file_scan_info.h @@ -42,7 +42,7 @@ struct FileScanInfo { uint32_t getNumFiles() const { return filePaths.size(); } std::string getFilePath(idx_t fileIdx) const { - KU_ASSERT(fileIdx < getNumFiles()); + RYU_ASSERT(fileIdx < getNumFiles()); return filePaths[fileIdx]; } diff --git a/src/include/common/data_chunk/data_chunk_collection.h b/src/include/common/data_chunk/data_chunk_collection.h index b65d23467b..3683d1af49 100644 --- a/src/include/common/data_chunk/data_chunk_collection.h +++ b/src/include/common/data_chunk/data_chunk_collection.h @@ -16,11 +16,11 @@ class DataChunkCollection { std::vector& getChunksUnsafe() { return chunks; } uint64_t getNumChunks() const { return chunks.size(); } const DataChunk& getChunk(uint64_t idx) const { - KU_ASSERT(idx < chunks.size()); + RYU_ASSERT(idx < chunks.size()); return chunks[idx]; } DataChunk& getChunkUnsafe(uint64_t idx) { - KU_ASSERT(idx < chunks.size()); + RYU_ASSERT(idx < chunks.size()); return chunks[idx]; } diff --git a/src/include/common/data_chunk/sel_vector.h b/src/include/common/data_chunk/sel_vector.h index dd469ba748..ea418e8292 100644 --- a/src/include/common/data_chunk/sel_vector.h +++ b/src/include/common/data_chunk/sel_vector.h @@ -66,7 +66,7 @@ class SelectionView { sel_t getSelSize() const { return selectedSize; } sel_t operator[](sel_t index) const { - KU_ASSERT(index < selectedSize); + RYU_ASSERT(index < selectedSize); return selectedPositions[index]; } @@ -113,7 +113,7 @@ class SelectionVector : public SelectionView { RYU_API void setToUnfiltered(); RYU_API void setToUnfiltered(sel_t size); void setRange(sel_t startPos, sel_t size) { - KU_ASSERT(startPos + size <= capacity); + RYU_ASSERT(startPos + size <= capacity); selectedPositions = selectedPositionsBuffer.get(); for (auto i = 0u; i < size; ++i) { selectedPositionsBuffer[i] = startPos + i; @@ -128,7 +128,7 @@ class SelectionVector : public SelectionView { state = State::DYNAMIC; } void setToFiltered(sel_t size) { - KU_ASSERT(size <= capacity && selectedPositionsBuffer); + RYU_ASSERT(size <= capacity && selectedPositionsBuffer); setToFiltered(); selectedSize = size; } @@ -145,20 +145,20 @@ class SelectionVector : public SelectionView { } void setSelSize(sel_t size) { - KU_ASSERT(size <= capacity); + RYU_ASSERT(size <= capacity); selectedSize = size; } void incrementSelSize(sel_t increment = 1) { - KU_ASSERT(selectedSize < capacity); + RYU_ASSERT(selectedSize < capacity); selectedSize += increment; } sel_t operator[](sel_t index) const { - KU_ASSERT(index < capacity); + RYU_ASSERT(index < capacity); return const_cast(selectedPositions[index]); } sel_t& operator[](sel_t index) { - KU_ASSERT(index < capacity); + RYU_ASSERT(index < capacity); return const_cast(selectedPositions[index]); } diff --git a/src/include/common/enums/extend_direction_util.h b/src/include/common/enums/extend_direction_util.h index 77c8cd06cc..50aee28557 100644 --- a/src/include/common/enums/extend_direction_util.h +++ b/src/include/common/enums/extend_direction_util.h @@ -10,7 +10,7 @@ namespace common { class ExtendDirectionUtil { public: static RelDataDirection getRelDataDirection(ExtendDirection direction) { - KU_ASSERT(direction != ExtendDirection::BOTH); + RYU_ASSERT(direction != ExtendDirection::BOTH); return direction == ExtendDirection::FWD ? RelDataDirection::FWD : RelDataDirection::BWD; } diff --git a/src/include/common/file_system/compressed_file_system.h b/src/include/common/file_system/compressed_file_system.h index 5b18f2f510..d8eaafce9f 100644 --- a/src/include/common/file_system/compressed_file_system.h +++ b/src/include/common/file_system/compressed_file_system.h @@ -39,7 +39,7 @@ class CompressedFileSystem : public FileSystem { protected: std::vector glob(main::ClientContext* /*context*/, const std::string& /*path*/) const override { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void readFromFile(FileInfo& /*fileInfo*/, void* /*buffer*/, uint64_t /*numBytes*/, @@ -49,13 +49,13 @@ class CompressedFileSystem : public FileSystem { void writeFile(FileInfo& /*fileInfo*/, const uint8_t* /*buffer*/, uint64_t /*numBytes*/, uint64_t /*offset*/) const override { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void reset(FileInfo& fileInfo) override; int64_t seek(FileInfo& /*fileInfo*/, uint64_t /*offset*/, int /*whence*/) const override { - KU_UNREACHABLE; + RYU_UNREACHABLE; } uint64_t getFileSize(const FileInfo& fileInfo) const override; diff --git a/src/include/common/file_system/file_info.h b/src/include/common/file_system/file_info.h index fab8147a83..9b0592cab0 100644 --- a/src/include/common/file_system/file_info.h +++ b/src/include/common/file_system/file_info.h @@ -36,7 +36,7 @@ struct RYU_API FileInfo { bool canPerformSeek() const; - virtual function::TableFunction getHandleFunction() const { KU_UNREACHABLE; } + virtual function::TableFunction getHandleFunction() const { RYU_UNREACHABLE; } template TARGET* ptrCast() { diff --git a/src/include/common/file_system/file_system.h b/src/include/common/file_system/file_system.h index f07548de22..04721bede1 100644 --- a/src/include/common/file_system/file_system.h +++ b/src/include/common/file_system/file_system.h @@ -55,12 +55,12 @@ class RYU_API FileSystem { virtual std::unique_ptr openFile(const std::string& /*path*/, FileOpenFlags /*flags*/, main::ClientContext* /*context*/ = nullptr) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } virtual std::vector glob(main::ClientContext* /*context*/, const std::string& /*path*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } virtual void overwriteFile(const std::string& from, const std::string& to); @@ -84,7 +84,7 @@ class RYU_API FileSystem { static std::string getFileName(const std::filesystem::path& path); - virtual bool canHandleFile(const std::string_view /*path*/) const { KU_UNREACHABLE; } + virtual bool canHandleFile(const std::string_view /*path*/) const { RYU_UNREACHABLE; } virtual void syncFile(const FileInfo& fileInfo) const = 0; @@ -93,7 +93,7 @@ class RYU_API FileSystem { virtual bool handleFileViaFunction(const std::string& /*path*/) const { return false; } virtual function::TableFunction getHandleFunction(const std::string& /*path*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } template diff --git a/src/include/common/mask.h b/src/include/common/mask.h index bdf987a497..004a1a4935 100644 --- a/src/include/common/mask.h +++ b/src/include/common/mask.h @@ -45,7 +45,7 @@ class NodeOffsetMaskMap { offset_t getNumMaskedNode() const; void addMask(table_id_t tableID, std::unique_ptr mask) { - KU_ASSERT(!maskMap.contains(tableID)); + RYU_ASSERT(!maskMap.contains(tableID)); maskMap.insert({tableID, std::move(mask)}); } @@ -59,7 +59,7 @@ class NodeOffsetMaskMap { bool containsTableID(table_id_t tableID) const { return maskMap.contains(tableID); } SemiMask* getOffsetMask(table_id_t tableID) const { - KU_ASSERT(containsTableID(tableID)); + RYU_ASSERT(containsTableID(tableID)); return maskMap.at(tableID).get(); } @@ -74,11 +74,11 @@ class NodeOffsetMaskMap { SemiMask* getPinnedMask() const { return pinnedMask; } bool valid(offset_t offset) const { - KU_ASSERT(pinnedMask != nullptr); + RYU_ASSERT(pinnedMask != nullptr); return pinnedMask->isMasked(offset); } bool valid(nodeID_t nodeID) const { - KU_ASSERT(maskMap.contains(nodeID.tableID)); + RYU_ASSERT(maskMap.contains(nodeID.tableID)); return maskMap.at(nodeID.tableID)->isMasked(nodeID.offset); } diff --git a/src/include/common/mpsc_queue.h b/src/include/common/mpsc_queue.h index bf07d9bc2d..eaa70a667c 100644 --- a/src/include/common/mpsc_queue.h +++ b/src/include/common/mpsc_queue.h @@ -90,7 +90,7 @@ class MPSCQueue { T dummy; while (pop(dummy)) {} - KU_ASSERT(head == tail.load(std::memory_order_relaxed)); + RYU_ASSERT(head == tail.load(std::memory_order_relaxed)); delete head; } diff --git a/src/include/common/null_mask.h b/src/include/common/null_mask.h index 315969756a..ef8f9c96a1 100644 --- a/src/include/common/null_mask.h +++ b/src/include/common/null_mask.h @@ -106,7 +106,7 @@ class RYU_API NullMask { static void setNull(uint64_t* nullEntries, uint32_t pos, bool isNull); inline void setNull(uint32_t pos, bool isNull) { - KU_ASSERT(pos < getNumNullBits(data)); + RYU_ASSERT(pos < getNumNullBits(data)); setNull(data.data(), pos, isNull); if (isNull) { mayContainNulls = true; @@ -123,7 +123,7 @@ class RYU_API NullMask { } inline bool isNull(uint32_t pos) const { - KU_ASSERT(pos < getNumNullBits(data)); + RYU_ASSERT(pos < getNumNullBits(data)); return isNull(data.data(), pos); } diff --git a/src/include/common/serializer/deserializer.h b/src/include/common/serializer/deserializer.h index e3219314ff..7bcb253a14 100644 --- a/src/include/common/serializer/deserializer.h +++ b/src/include/common/serializer/deserializer.h @@ -95,7 +95,7 @@ class RYU_API Deserializer { template void deserializeArray(std::array& values) { - KU_ASSERT(values.size() == ARRAY_SIZE); + RYU_ASSERT(values.size() == ARRAY_SIZE); for (auto& value : values) { if constexpr (requires(Deserializer& deser) { T::deserialize(deser); }) { value = T::deserialize(*this); diff --git a/src/include/common/serializer/in_mem_file_writer.h b/src/include/common/serializer/in_mem_file_writer.h index 47de1ac2d9..cab5165fd1 100644 --- a/src/include/common/serializer/in_mem_file_writer.h +++ b/src/include/common/serializer/in_mem_file_writer.h @@ -22,7 +22,7 @@ class InMemFileWriter final : public Writer { void write(const uint8_t* data, uint64_t size) override; std::span getPage(page_idx_t pageIdx) const { - KU_ASSERT(pageIdx < pages.size()); + RYU_ASSERT(pageIdx < pages.size()); return pages[pageIdx]->getBuffer(); } diff --git a/src/include/common/static_vector.h b/src/include/common/static_vector.h index 09ba45221b..a38aa3016c 100644 --- a/src/include/common/static_vector.h +++ b/src/include/common/static_vector.h @@ -48,20 +48,20 @@ class StaticVector { ~StaticVector() { clear(); } T& operator[](size_t i) { - KU_ASSERT(i < len); + RYU_ASSERT(i < len); return items[i].assumeInit(); } const T& operator[](size_t i) const { - KU_ASSERT(i < len); + RYU_ASSERT(i < len); return items[i].assumeInit(); } void push_back(T elem) { - KU_ASSERT(len < N); + RYU_ASSERT(len < N); new (items[len].ptr()) T(std::move(elem)); len++; } T pop_back() { - KU_ASSERT(len > 0); + RYU_ASSERT(len > 0); len--; return std::move(items[len].assumeInit()); } diff --git a/src/include/common/timer.h b/src/include/common/timer.h index 7cd4207183..0f2738180d 100644 --- a/src/include/common/timer.h +++ b/src/include/common/timer.h @@ -34,7 +34,7 @@ class Timer { auto now = std::chrono::high_resolution_clock::now(); auto duration = now - startTime; auto count = std::chrono::duration_cast(duration).count(); - KU_ASSERT(count >= 0); + RYU_ASSERT(count >= 0); return count; } diff --git a/src/include/common/type_utils.h b/src/include/common/type_utils.h index d91872882e..73658b04ad 100644 --- a/src/include/common/type_utils.h +++ b/src/include/common/type_utils.h @@ -104,7 +104,7 @@ class TypeUtils { std::same_as) { return common::PhysicalTypeID::STRING; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -121,7 +121,7 @@ class TypeUtils { * } else if (std::integral) { * result = std::to_string(vector->getValue(0)); * } else { - * KU_UNREACHABLE; + * RYU_UNREACHABLE; * } * }); * @@ -134,7 +134,7 @@ class TypeUtils { * [&](T) { * result = std::to_string(vector->getValue(0)); * }, - * [](auto) { KU_UNREACHABLE; } + * [](auto) { RYU_UNREACHABLE; } * ); * * Note that when multiple functions are provided, at least one function must match all data @@ -187,7 +187,7 @@ class TypeUtils { case PhysicalTypeID::INT128: return func(int128_t()); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } case LogicalTypeID::INTERVAL: return func(interval_t()); @@ -228,7 +228,7 @@ class TypeUtils { /* NOLINTEND(bugprone-branch-clone)*/ default: // Unsupported type - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -282,11 +282,11 @@ class TypeUtils { case PhysicalTypeID::ALP_EXCEPTION_DOUBLE: case PhysicalTypeID::ALP_EXCEPTION_FLOAT: // Unsupported type - KU_UNREACHABLE; + RYU_UNREACHABLE; // Needed for return type deduction to work return func(uint8_t()); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } }; diff --git a/src/include/common/types/value/value.h b/src/include/common/types/value/value.h index 0351db9806..ab2cb7d9ab 100644 --- a/src/include/common/types/value/value.h +++ b/src/include/common/types/value/value.h @@ -308,7 +308,7 @@ class Value { */ template<> RYU_API inline bool Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::BOOL); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::BOOL); return val.booleanVal; } @@ -317,7 +317,7 @@ RYU_API inline bool Value::getValue() const { */ template<> RYU_API inline int8_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT8); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT8); return val.int8Val; } @@ -326,7 +326,7 @@ RYU_API inline int8_t Value::getValue() const { */ template<> RYU_API inline int16_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT16); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT16); return val.int16Val; } @@ -335,7 +335,7 @@ RYU_API inline int16_t Value::getValue() const { */ template<> RYU_API inline int32_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT32); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT32); return val.int32Val; } @@ -344,7 +344,7 @@ RYU_API inline int32_t Value::getValue() const { */ template<> RYU_API inline int64_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT64); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT64); return val.int64Val; } @@ -353,7 +353,7 @@ RYU_API inline int64_t Value::getValue() const { */ template<> RYU_API inline uint64_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT64); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT64); return val.uint64Val; } @@ -362,7 +362,7 @@ RYU_API inline uint64_t Value::getValue() const { */ template<> RYU_API inline uint32_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT32); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT32); return val.uint32Val; } @@ -371,7 +371,7 @@ RYU_API inline uint32_t Value::getValue() const { */ template<> RYU_API inline uint16_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT16); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT16); return val.uint16Val; } @@ -380,7 +380,7 @@ RYU_API inline uint16_t Value::getValue() const { */ template<> RYU_API inline uint8_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT8); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT8); return val.uint8Val; } @@ -389,7 +389,7 @@ RYU_API inline uint8_t Value::getValue() const { */ template<> RYU_API inline int128_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT128); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT128); return val.int128Val; } @@ -398,7 +398,7 @@ RYU_API inline int128_t Value::getValue() const { */ template<> RYU_API inline float Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::FLOAT); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::FLOAT); return val.floatVal; } @@ -407,7 +407,7 @@ RYU_API inline float Value::getValue() const { */ template<> RYU_API inline double Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::DOUBLE); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::DOUBLE); return val.doubleVal; } @@ -416,7 +416,7 @@ RYU_API inline double Value::getValue() const { */ template<> RYU_API inline date_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::DATE); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::DATE); return date_t{val.int32Val}; } @@ -425,7 +425,7 @@ RYU_API inline date_t Value::getValue() const { */ template<> RYU_API inline timestamp_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP); return timestamp_t{val.int64Val}; } @@ -434,7 +434,7 @@ RYU_API inline timestamp_t Value::getValue() const { */ template<> RYU_API inline timestamp_ns_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_NS); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_NS); return timestamp_ns_t{val.int64Val}; } @@ -443,7 +443,7 @@ RYU_API inline timestamp_ns_t Value::getValue() const { */ template<> RYU_API inline timestamp_ms_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_MS); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_MS); return timestamp_ms_t{val.int64Val}; } @@ -452,7 +452,7 @@ RYU_API inline timestamp_ms_t Value::getValue() const { */ template<> RYU_API inline timestamp_sec_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_SEC); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_SEC); return timestamp_sec_t{val.int64Val}; } @@ -461,7 +461,7 @@ RYU_API inline timestamp_sec_t Value::getValue() const { */ template<> RYU_API inline timestamp_tz_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_TZ); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_TZ); return timestamp_tz_t{val.int64Val}; } @@ -470,7 +470,7 @@ RYU_API inline timestamp_tz_t Value::getValue() const { */ template<> RYU_API inline interval_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERVAL); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERVAL); return val.intervalVal; } @@ -479,7 +479,7 @@ RYU_API inline interval_t Value::getValue() const { */ template<> RYU_API inline internalID_t Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); return val.internalIDVal; } @@ -488,7 +488,7 @@ RYU_API inline internalID_t Value::getValue() const { */ template<> RYU_API inline uint128_t Value::getValue() const { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT128); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT128); return val.uint128Val; } @@ -497,7 +497,7 @@ RYU_API inline uint128_t Value::getValue() const { */ template<> RYU_API inline std::string Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::STRING || + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::STRING || dataType.getLogicalTypeID() == LogicalTypeID::BLOB || dataType.getLogicalTypeID() == LogicalTypeID::UUID); return strVal; @@ -508,7 +508,7 @@ RYU_API inline std::string Value::getValue() const { */ template<> RYU_API inline uint8_t* Value::getValue() const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::POINTER); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::POINTER); return val.pointer; } @@ -517,7 +517,7 @@ RYU_API inline uint8_t* Value::getValue() const { */ template<> RYU_API inline bool& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::BOOL); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::BOOL); return val.booleanVal; } @@ -526,7 +526,7 @@ RYU_API inline bool& Value::getValueReference() { */ template<> RYU_API inline int8_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT8); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT8); return val.int8Val; } @@ -535,7 +535,7 @@ RYU_API inline int8_t& Value::getValueReference() { */ template<> RYU_API inline int16_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT16); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT16); return val.int16Val; } @@ -544,7 +544,7 @@ RYU_API inline int16_t& Value::getValueReference() { */ template<> RYU_API inline int32_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT32); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT32); return val.int32Val; } @@ -553,7 +553,7 @@ RYU_API inline int32_t& Value::getValueReference() { */ template<> RYU_API inline int64_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT64); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT64); return val.int64Val; } @@ -562,7 +562,7 @@ RYU_API inline int64_t& Value::getValueReference() { */ template<> RYU_API inline uint8_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT8); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT8); return val.uint8Val; } @@ -571,7 +571,7 @@ RYU_API inline uint8_t& Value::getValueReference() { */ template<> RYU_API inline uint16_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT16); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT16); return val.uint16Val; } @@ -580,7 +580,7 @@ RYU_API inline uint16_t& Value::getValueReference() { */ template<> RYU_API inline uint32_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT32); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT32); return val.uint32Val; } @@ -589,7 +589,7 @@ RYU_API inline uint32_t& Value::getValueReference() { */ template<> RYU_API inline uint64_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT64); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT64); return val.uint64Val; } @@ -598,7 +598,7 @@ RYU_API inline uint64_t& Value::getValueReference() { */ template<> RYU_API inline int128_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT128); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::INT128); return val.int128Val; } @@ -607,7 +607,7 @@ RYU_API inline int128_t& Value::getValueReference() { */ template<> RYU_API inline float& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::FLOAT); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::FLOAT); return val.floatVal; } @@ -616,7 +616,7 @@ RYU_API inline float& Value::getValueReference() { */ template<> RYU_API inline double& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::DOUBLE); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::DOUBLE); return val.doubleVal; } @@ -625,7 +625,7 @@ RYU_API inline double& Value::getValueReference() { */ template<> RYU_API inline date_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::DATE); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::DATE); return *reinterpret_cast(&val.int32Val); } @@ -634,7 +634,7 @@ RYU_API inline date_t& Value::getValueReference() { */ template<> RYU_API inline timestamp_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP); return *reinterpret_cast(&val.int64Val); } @@ -643,7 +643,7 @@ RYU_API inline timestamp_t& Value::getValueReference() { */ template<> RYU_API inline timestamp_ms_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_MS); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_MS); return *reinterpret_cast(&val.int64Val); } @@ -652,7 +652,7 @@ RYU_API inline timestamp_ms_t& Value::getValueReference() { */ template<> RYU_API inline timestamp_ns_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_NS); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_NS); return *reinterpret_cast(&val.int64Val); } @@ -661,7 +661,7 @@ RYU_API inline timestamp_ns_t& Value::getValueReference() { */ template<> RYU_API inline timestamp_sec_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_SEC); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_SEC); return *reinterpret_cast(&val.int64Val); } @@ -670,7 +670,7 @@ RYU_API inline timestamp_sec_t& Value::getValueReference() { */ template<> RYU_API inline timestamp_tz_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_TZ); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::TIMESTAMP_TZ); return *reinterpret_cast(&val.int64Val); } @@ -679,7 +679,7 @@ RYU_API inline timestamp_tz_t& Value::getValueReference() { */ template<> RYU_API inline interval_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERVAL); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERVAL); return val.intervalVal; } @@ -688,7 +688,7 @@ RYU_API inline interval_t& Value::getValueReference() { */ template<> RYU_API inline uint128_t& Value::getValueReference() { - KU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT128); + RYU_ASSERT(dataType.getPhysicalType() == PhysicalTypeID::UINT128); return val.uint128Val; } @@ -697,7 +697,7 @@ RYU_API inline uint128_t& Value::getValueReference() { */ template<> RYU_API inline nodeID_t& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); return val.internalIDVal; } @@ -706,7 +706,7 @@ RYU_API inline nodeID_t& Value::getValueReference() { */ template<> RYU_API inline std::string& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::STRING); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::STRING); return strVal; } @@ -715,7 +715,7 @@ RYU_API inline std::string& Value::getValueReference() { */ template<> RYU_API inline uint8_t*& Value::getValueReference() { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::POINTER); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::POINTER); return val.pointer; } diff --git a/src/include/common/utils.h b/src/include/common/utils.h index 7e9bea0bb8..28c4f7180c 100644 --- a/src/include/common/utils.h +++ b/src/include/common/utils.h @@ -17,7 +17,7 @@ class BitmaskUtils { template requires std::integral static T all1sMaskForLeastSignificantBits(uint32_t numBits) { - KU_ASSERT(numBits <= 64); + RYU_ASSERT(numBits <= 64); using U = numeric_utils::MakeUnSignedT; return (T)(numBits == (sizeof(U) * 8) ? std::numeric_limits::max() : static_cast(((U)1 << numBits) - 1)); @@ -49,7 +49,7 @@ constexpr T ceilDiv(T a, T b) { template constexpr To safeIntegerConversion(From val) { - KU_ASSERT(static_cast(val) == val); + RYU_ASSERT(static_cast(val) == val); return val; } diff --git a/src/include/common/vector/value_vector.h b/src/include/common/vector/value_vector.h index a20e8e3b14..ee68deb0d0 100644 --- a/src/include/common/vector/value_vector.h +++ b/src/include/common/vector/value_vector.h @@ -30,7 +30,7 @@ class RYU_API ValueVector { std::shared_ptr dataChunkState = nullptr); explicit ValueVector(LogicalTypeID dataTypeID, storage::MemoryManager* memoryManager = nullptr) : ValueVector(LogicalType(dataTypeID), memoryManager) { - KU_ASSERT(dataTypeID != LogicalTypeID::LIST); + RYU_ASSERT(dataTypeID != LogicalTypeID::LIST); } DELETE_COPY_AND_MOVE(ValueVector); @@ -119,7 +119,7 @@ class RYU_API ValueVector { uint8_t* getData() const { return valueBuffer.get(); } offset_t readNodeOffset(uint32_t pos) const { - KU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); + RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::INTERNAL_ID); return getValue(pos).offset; } @@ -155,7 +155,7 @@ class RYU_API ValueVector { class RYU_API StringVector { public: static inline InMemOverflowBuffer* getInMemOverflowBuffer(ValueVector* vector) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); return ku_dynamic_cast(vector->auxiliaryBuffer.get()) ->getOverflowBuffer(); } @@ -199,7 +199,7 @@ class RYU_API ListVector { // copyListEntryAndBufferMetaData at runtime. // TODO(Xiyang): try to merge setDataVector & copyListEntryAndBufferMetaData static void setDataVector(const ValueVector* vector, std::shared_ptr dataVector) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); auto& listBuffer = getAuxBufferUnsafe(*vector); listBuffer.setDataVector(std::move(dataVector)); } @@ -207,34 +207,34 @@ class RYU_API ListVector { const SelectionVector& selVector, const ValueVector& other, const SelectionVector& otherSelVector); static ValueVector* getDataVector(const ValueVector* vector) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); return getAuxBuffer(*vector).getDataVector(); } static std::shared_ptr getSharedDataVector(const ValueVector* vector) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); return getAuxBuffer(*vector).getSharedDataVector(); } static uint64_t getDataVectorSize(const ValueVector* vector) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); return getAuxBuffer(*vector).getSize(); } static uint8_t* getListValues(const ValueVector* vector, const list_entry_t& listEntry) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); auto dataVector = getDataVector(vector); return dataVector->getData() + dataVector->getNumBytesPerValue() * listEntry.offset; } static uint8_t* getListValuesWithOffset(const ValueVector* vector, const list_entry_t& listEntry, offset_t elementOffsetInList) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); return getListValues(vector, listEntry) + elementOffsetInList * getDataVector(vector)->getNumBytesPerValue(); } static list_entry_t addList(ValueVector* vector, uint64_t listSize) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); return getAuxBufferUnsafe(*vector).addList(listSize); } static void resizeDataVector(ValueVector* vector, uint64_t numValues) { - KU_ASSERT(validateType(*vector)); + RYU_ASSERT(validateType(*vector)); getAuxBufferUnsafe(*vector).resize(numValues); } @@ -295,18 +295,18 @@ class StructVector { class UnionVector { public: static inline ValueVector* getTagVector(const ValueVector* vector) { - KU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UNION); return StructVector::getFieldVector(vector, UnionType::TAG_FIELD_IDX).get(); } static inline ValueVector* getValVector(const ValueVector* vector, union_field_idx_t fieldIdx) { - KU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UNION); return StructVector::getFieldVector(vector, UnionType::getInternalFieldIdx(fieldIdx)).get(); } static inline std::shared_ptr getSharedValVector(const ValueVector* vector, union_field_idx_t fieldIdx) { - KU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(vector->dataType.getLogicalTypeID() == LogicalTypeID::UNION); return StructVector::getFieldVector(vector, UnionType::getInternalFieldIdx(fieldIdx)); } @@ -318,7 +318,7 @@ class UnionVector { static inline void setTagField(ValueVector& vector, SelectionVector& sel, union_field_idx_t tag) { - KU_ASSERT(vector.dataType.getLogicalTypeID() == LogicalTypeID::UNION); + RYU_ASSERT(vector.dataType.getLogicalTypeID() == LogicalTypeID::UNION); for (auto i = 0u; i < sel.getSelSize(); i++) { vector.setValue(sel[i], tag); } diff --git a/src/include/expression_evaluator/lambda_evaluator.h b/src/include/expression_evaluator/lambda_evaluator.h index b5d450e92c..91125b340d 100644 --- a/src/include/expression_evaluator/lambda_evaluator.h +++ b/src/include/expression_evaluator/lambda_evaluator.h @@ -25,7 +25,7 @@ class LambdaParamEvaluator : public ExpressionEvaluator { void evaluate() override {} - bool selectInternal(common::SelectionVector&) override { KU_UNREACHABLE; } + bool selectInternal(common::SelectionVector&) override { RYU_UNREACHABLE; } std::unique_ptr copy() override { return std::make_unique(expression); diff --git a/src/include/expression_evaluator/list_slice_info.h b/src/include/expression_evaluator/list_slice_info.h index e951972f37..3690cb264c 100644 --- a/src/include/expression_evaluator/list_slice_info.h +++ b/src/include/expression_evaluator/list_slice_info.h @@ -87,7 +87,7 @@ class ListSliceInfo { bool done() const; common::sel_t getSliceSize() const { - KU_ASSERT(sliceDataState->getSelSize() == sliceListEntryState->getSelSize()); + RYU_ASSERT(sliceDataState->getSelSize() == sliceListEntryState->getSelSize()); return sliceDataState->getSelSize(); } diff --git a/src/include/expression_evaluator/path_evaluator.h b/src/include/expression_evaluator/path_evaluator.h index acb655371e..2eef7deb39 100644 --- a/src/include/expression_evaluator/path_evaluator.h +++ b/src/include/expression_evaluator/path_evaluator.h @@ -23,7 +23,7 @@ class PathExpressionEvaluator final : public ExpressionEvaluator { void evaluate() override; - bool selectInternal(common::SelectionVector& /*selVector*/) override { KU_UNREACHABLE; } + bool selectInternal(common::SelectionVector& /*selVector*/) override { RYU_UNREACHABLE; } std::unique_ptr copy() override { return make_unique(expression, copyVector(children)); diff --git a/src/include/expression_evaluator/pattern_evaluator.h b/src/include/expression_evaluator/pattern_evaluator.h index d7884dd6d2..4870c12732 100644 --- a/src/include/expression_evaluator/pattern_evaluator.h +++ b/src/include/expression_evaluator/pattern_evaluator.h @@ -16,7 +16,7 @@ class PatternExpressionEvaluator : public ExpressionEvaluator { void evaluate() override; - bool selectInternal(common::SelectionVector&) override { KU_UNREACHABLE; } + bool selectInternal(common::SelectionVector&) override { RYU_UNREACHABLE; } std::unique_ptr copy() override { return std::make_unique(expression, copyVector(children)); diff --git a/src/include/function/aggregate/avg.h b/src/include/function/aggregate/avg.h index 22a65f93a6..3f08222f37 100644 --- a/src/include/function/aggregate/avg.h +++ b/src/include/function/aggregate/avg.h @@ -50,7 +50,7 @@ struct AvgFunction { static void updateAll(uint8_t* state_, common::ValueVector* input, uint64_t multiplicity, common::InMemOverflowBuffer* /*overflowBuffer*/) { auto* state = reinterpret_cast*>(state_); - KU_ASSERT(!input->state->isFlat()); + RYU_ASSERT(!input->state->isFlat()); input->forEachNonNull( [&](auto pos) { updateSingleValue(state, input, pos, multiplicity); }); } diff --git a/src/include/function/aggregate/min_max.h b/src/include/function/aggregate/min_max.h index b5b070bb2a..68d942edf6 100644 --- a/src/include/function/aggregate/min_max.h +++ b/src/include/function/aggregate/min_max.h @@ -24,7 +24,7 @@ struct MinMaxFunction { template static void updateAll(uint8_t* state_, common::ValueVector* input, uint64_t /*multiplicity*/, common::InMemOverflowBuffer* overflowBuffer) { - KU_ASSERT(!input->state->isFlat()); + RYU_ASSERT(!input->state->isFlat()); auto* state = reinterpret_cast(state_); input->forEachNonNull( [&](auto pos) { updateSingleValue(state, input, pos, overflowBuffer); }); diff --git a/src/include/function/aggregate/sum.h b/src/include/function/aggregate/sum.h index ccefbf2475..8d021202db 100644 --- a/src/include/function/aggregate/sum.h +++ b/src/include/function/aggregate/sum.h @@ -24,7 +24,7 @@ struct SumFunction { static void updateAll(uint8_t* state_, common::ValueVector* input, uint64_t multiplicity, common::InMemOverflowBuffer* /*overflowBuffer*/) { - KU_ASSERT(!input->state->isFlat()); + RYU_ASSERT(!input->state->isFlat()); auto* state = reinterpret_cast*>(state_); input->forEachNonNull( [&](auto pos) { updateSingleValue(state, input, pos, multiplicity); }); diff --git a/src/include/function/array/functions/array_cosine_similarity.h b/src/include/function/array/functions/array_cosine_similarity.h index fdde4a197c..e3b5334185 100644 --- a/src/include/function/array/functions/array_cosine_similarity.h +++ b/src/include/function/array/functions/array_cosine_similarity.h @@ -15,7 +15,7 @@ struct ArrayCosineSimilarity { common::ValueVector& /*resultVector*/) { auto leftElements = (T*)common::ListVector::getListValues(&leftVector, left); auto rightElements = (T*)common::ListVector::getListValues(&rightVector, right); - KU_ASSERT(left.size == right.size); + RYU_ASSERT(left.size == right.size); simsimd_distance_t tmpResult = 0.0; static_assert(std::is_same_v || std::is_same_v); if constexpr (std::is_same_v) { diff --git a/src/include/function/array/functions/array_inner_product.h b/src/include/function/array/functions/array_inner_product.h index 2eaffde4eb..54e395f1d0 100644 --- a/src/include/function/array/functions/array_inner_product.h +++ b/src/include/function/array/functions/array_inner_product.h @@ -13,7 +13,7 @@ struct ArrayInnerProduct { common::ValueVector& /*resultVector*/) { auto leftElements = (T*)common::ListVector::getListValues(&leftVector, left); auto rightElements = (T*)common::ListVector::getListValues(&rightVector, right); - KU_ASSERT(left.size == right.size); + RYU_ASSERT(left.size == right.size); simsimd_distance_t tmpResult = 0.0; static_assert(std::is_same_v || std::is_same_v); if constexpr (std::is_same_v) { diff --git a/src/include/function/array/functions/array_squared_distance.h b/src/include/function/array/functions/array_squared_distance.h index a8a111ff0f..9fdf4cac11 100644 --- a/src/include/function/array/functions/array_squared_distance.h +++ b/src/include/function/array/functions/array_squared_distance.h @@ -13,7 +13,7 @@ struct ArraySquaredDistance { common::ValueVector& /*resultVector*/) { auto leftElements = (T*)common::ListVector::getListValues(&leftVector, left); auto rightElements = (T*)common::ListVector::getListValues(&rightVector, right); - KU_ASSERT(left.size == right.size); + RYU_ASSERT(left.size == right.size); simsimd_distance_t tmpResult = 0.0; static_assert(std::is_same_v || std::is_same_v); if constexpr (std::is_same_v) { diff --git a/src/include/function/boolean/boolean_function_executor.h b/src/include/function/boolean/boolean_function_executor.h index b7a58a59a4..2e1d52b9af 100644 --- a/src/include/function/boolean/boolean_function_executor.h +++ b/src/include/function/boolean/boolean_function_executor.h @@ -106,7 +106,7 @@ struct BinaryBooleanFunctionExecutor { static void executeBothUnFlat(common::ValueVector& left, common::SelectionVector* leftSelVector, common::ValueVector& right, [[maybe_unused]] common::SelectionVector* rightSelVector, common::ValueVector& result, common::SelectionVector*) { - KU_ASSERT(leftSelVector == rightSelVector); + RYU_ASSERT(leftSelVector == rightSelVector); if (leftSelVector->isUnfiltered()) { if (left.hasNoNullsGuarantee() && right.hasNoNullsGuarantee()) { for (auto i = 0u; i < leftSelVector->getSelSize(); ++i) { @@ -136,7 +136,7 @@ struct BinaryBooleanFunctionExecutor { static void execute(common::ValueVector& left, common::SelectionVector* leftSelVector, common::ValueVector& right, common::SelectionVector* rightSelVector, common::ValueVector& result, common::SelectionVector* resultSelVector) { - KU_ASSERT(left.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && + RYU_ASSERT(left.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && right.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && result.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); if (left.state->isFlat() && right.state->isFlat()) { @@ -246,7 +246,7 @@ struct BinaryBooleanFunctionExecutor { template static bool select(common::ValueVector& left, common::ValueVector& right, common::SelectionVector& selVector) { - KU_ASSERT(left.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && + RYU_ASSERT(left.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && right.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); if (left.state->isFlat() && right.state->isFlat()) { return selectBothFlat(left, right); diff --git a/src/include/function/boolean/vector_boolean_functions.h b/src/include/function/boolean/vector_boolean_functions.h index dcac361a8c..111a24bae0 100644 --- a/src/include/function/boolean/vector_boolean_functions.h +++ b/src/include/function/boolean/vector_boolean_functions.h @@ -20,7 +20,7 @@ class VectorBooleanFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryBooleanFunctionExecutor::execute(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector); } @@ -29,7 +29,7 @@ class VectorBooleanFunction { static bool BinaryBooleanSelectFunction( const std::vector>& params, common::SelectionVector& selVector, void* /*dataPtr*/) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); return BinaryBooleanFunctionExecutor::select(*params[0], *params[1], selVector); } @@ -38,7 +38,7 @@ class VectorBooleanFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); UnaryBooleanOperationExecutor::execute(*params[0], paramSelVectors[0], result, resultSelVector); } @@ -47,7 +47,7 @@ class VectorBooleanFunction { static bool UnaryBooleanSelectFunction( const std::vector>& params, common::SelectionVector& selVector, void* /*dataPtr*/) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); return UnaryBooleanOperationExecutor::select(*params[0], selVector); } diff --git a/src/include/function/comparison/vector_comparison_functions.h b/src/include/function/comparison/vector_comparison_functions.h index 60b36640bf..e7829bcdf6 100644 --- a/src/include/function/comparison/vector_comparison_functions.h +++ b/src/include/function/comparison/vector_comparison_functions.h @@ -27,7 +27,7 @@ struct ComparisonFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector, dataPtr); @@ -37,7 +37,7 @@ struct ComparisonFunction { static bool BinaryComparisonSelectFunction( const std::vector>& params, common::SelectionVector& selVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); return BinaryFunctionExecutor::selectComparison(*params[0], *params[1], selVector, dataPtr); } @@ -154,7 +154,7 @@ struct ComparisonFunction { template static void getSelectFunc(common::PhysicalTypeID leftTypeID, common::PhysicalTypeID rightTypeID, scalar_func_select_t& func) { - KU_ASSERT(leftTypeID == rightTypeID); + RYU_ASSERT(leftTypeID == rightTypeID); switch (leftTypeID) { case common::PhysicalTypeID::INT64: { func = BinaryComparisonSelectFunction; diff --git a/src/include/function/const_function_executor.h b/src/include/function/const_function_executor.h index cd3d6713cf..44f5b6fec2 100644 --- a/src/include/function/const_function_executor.h +++ b/src/include/function/const_function_executor.h @@ -9,10 +9,10 @@ struct ConstFunctionExecutor { template static void execute(common::ValueVector& result, common::SelectionVector& sel) { - KU_ASSERT(result.state->isFlat()); + RYU_ASSERT(result.state->isFlat()); auto resultValues = (RESULT_TYPE*)result.getData(); auto idx = sel[0]; - KU_ASSERT(idx == 0); + RYU_ASSERT(idx == 0); OP::operation(resultValues[idx]); } }; diff --git a/src/include/function/date/date_functions.h b/src/include/function/date/date_functions.h index e7e6f3f9e5..09938e3ff9 100644 --- a/src/include/function/date/date_functions.h +++ b/src/include/function/date/date_functions.h @@ -11,7 +11,7 @@ namespace function { struct DayName { template static inline void operation(T& /*input*/, common::ku_string_t& /*result*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } }; @@ -33,7 +33,7 @@ inline void DayName::operation(common::timestamp_t& input, common::ku_string_t& struct MonthName { template static inline void operation(T& /*input*/, common::ku_string_t& /*result*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } }; @@ -56,7 +56,7 @@ struct LastDay { template static inline void operation(T& /*input*/, common::date_t& /*result*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } }; @@ -77,7 +77,7 @@ struct DatePart { template static inline void operation(LEFT_TYPE& /*partSpecifier*/, RIGHT_TYPE& /*input*/, int64_t& /*result*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } }; @@ -109,7 +109,7 @@ struct DateTrunc { template static inline void operation(LEFT_TYPE& /*partSpecifier*/, RIGHT_TYPE& /*input*/, RIGHT_TYPE& /*result*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } }; diff --git a/src/include/function/gds/bfs_graph.h b/src/include/function/gds/bfs_graph.h index 46fad68c80..dcfb67d467 100644 --- a/src/include/function/gds/bfs_graph.h +++ b/src/include/function/gds/bfs_graph.h @@ -166,7 +166,7 @@ class BFSGraphManager { storage::MemoryManager* mm); BaseBFSGraph* getCurrentGraph() const { - KU_ASSERT(curGraph); + RYU_ASSERT(curGraph); return curGraph; } diff --git a/src/include/function/gds/gds_frontier.h b/src/include/function/gds/gds_frontier.h index 8398249e70..9d2dff8c9f 100644 --- a/src/include/function/gds/gds_frontier.h +++ b/src/include/function/gds/gds_frontier.h @@ -282,7 +282,7 @@ class RYU_API DenseFrontierPair : public FrontierPair { void beginNewIterationInternalNoLock() override; std::unordered_set getActiveNodesOnCurrentFrontier() override { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void resetValue(processor::ExecutionContext* context, graph::Graph* graph, iteration_t val); diff --git a/src/include/function/gds/gds_object_manager.h b/src/include/function/gds/gds_object_manager.h index 4a03076a83..cd7145e4a8 100644 --- a/src/include/function/gds/gds_object_manager.h +++ b/src/include/function/gds/gds_object_manager.h @@ -63,17 +63,17 @@ class ObjectArray { } void set(const common::offset_t pos, const T value) { - KU_ASSERT_UNCONDITIONAL(pos < size); + RYU_ASSERT_UNCONDITIONAL(pos < size); data[pos] = value; } const T& get(const common::offset_t pos) const { - KU_ASSERT_UNCONDITIONAL(pos < size); + RYU_ASSERT_UNCONDITIONAL(pos < size); return data[pos]; } T& getUnsafe(const common::offset_t pos) { - KU_ASSERT_UNCONDITIONAL(pos < size); + RYU_ASSERT_UNCONDITIONAL(pos < size); return data[pos]; } @@ -103,18 +103,18 @@ class AtomicObjectArray { void set(common::offset_t pos, const T& value, std::memory_order order = std::memory_order_seq_cst) { - KU_ASSERT_UNCONDITIONAL(pos < array.size); + RYU_ASSERT_UNCONDITIONAL(pos < array.size); array.data[pos].store(value, order); } T get(const common::offset_t pos, std::memory_order order = std::memory_order_seq_cst) { - KU_ASSERT_UNCONDITIONAL(pos < array.size); + RYU_ASSERT_UNCONDITIONAL(pos < array.size); return array.data[pos].load(order); } void fetchAdd(common::offset_t pos, const T& value, std::memory_order order = std::memory_order_seq_cst) { - KU_ASSERT_UNCONDITIONAL(pos < array.size); + RYU_ASSERT_UNCONDITIONAL(pos < array.size); array.data[pos].fetch_add(value, order); } @@ -194,7 +194,7 @@ class GDSDenseObjectManager { } T* getData(common::table_id_t tableID) const { - KU_ASSERT(bufferPerTable.contains(tableID)); + RYU_ASSERT(bufferPerTable.contains(tableID)); return reinterpret_cast(bufferPerTable.at(tableID)->getData()); } @@ -213,7 +213,7 @@ class GDSSpareObjectManager { } void allocate(common::table_id_t tableID) { - KU_ASSERT(!mapPerTable.contains(tableID)); + RYU_ASSERT(!mapPerTable.contains(tableID)); mapPerTable.insert({tableID, {}}); } @@ -222,7 +222,7 @@ class GDSSpareObjectManager { } std::unordered_map* getMap(common::table_id_t tableID) { - KU_ASSERT(mapPerTable.contains(tableID)); + RYU_ASSERT(mapPerTable.contains(tableID)); return &mapPerTable.at(tableID); } @@ -230,7 +230,7 @@ class GDSSpareObjectManager { if (!mapPerTable.contains(tableID)) { mapPerTable.insert({tableID, {}}); } - KU_ASSERT(mapPerTable.contains(tableID)); + RYU_ASSERT(mapPerTable.contains(tableID)); return &mapPerTable.at(tableID); } diff --git a/src/include/function/null/null_function_executor.h b/src/include/function/null/null_function_executor.h index 3b2bfb19b4..4834290699 100644 --- a/src/include/function/null/null_function_executor.h +++ b/src/include/function/null/null_function_executor.h @@ -10,7 +10,7 @@ struct NullOperationExecutor { template static void execute(common::ValueVector& operand, common::SelectionVector& operandSelVector, common::ValueVector& result) { - KU_ASSERT(result.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); + RYU_ASSERT(result.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); auto resultValues = (uint8_t*)result.getData(); if (operand.state->isFlat()) { auto pos = operandSelVector[0]; diff --git a/src/include/function/null/vector_null_functions.h b/src/include/function/null/vector_null_functions.h index afb0a9e053..8e5e12e952 100644 --- a/src/include/function/null/vector_null_functions.h +++ b/src/include/function/null/vector_null_functions.h @@ -20,7 +20,7 @@ class VectorNullFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector*, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); NullOperationExecutor::execute(*params[0], *paramSelVectors[0], result); } @@ -28,7 +28,7 @@ class VectorNullFunction { static bool UnaryNullSelectFunction( const std::vector>& params, common::SelectionVector& selVector, void* dataPtr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); return NullOperationExecutor::select(*params[0], selVector, dataPtr); } }; diff --git a/src/include/function/path/path_function_executor.h b/src/include/function/path/path_function_executor.h index bcc0ceac9b..b0f61f733d 100644 --- a/src/include/function/path/path_function_executor.h +++ b/src/include/function/path/path_function_executor.h @@ -28,7 +28,7 @@ struct UnaryPathExecutor { static void executeNodeIDs(common::ValueVector& input, common::SelectionVector& inputSelVector, common::ValueVector& result) { auto nodesFieldIdx = 0; - KU_ASSERT(nodesFieldIdx == + RYU_ASSERT(nodesFieldIdx == common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::NODES)); auto nodesVector = common::StructVector::getFieldVector(&input, nodesFieldIdx).get(); auto internalIDFieldIdx = 0; @@ -38,7 +38,7 @@ struct UnaryPathExecutor { static void executeRelIDs(common::ValueVector& input, common::SelectionVector& inputSelVector, common::ValueVector& result) { auto relsFieldIdx = 1; - KU_ASSERT(relsFieldIdx == + RYU_ASSERT(relsFieldIdx == common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::RELS)); auto relsVector = common::StructVector::getFieldVector(&input, relsFieldIdx).get(); auto internalIDFieldIdx = 3; @@ -48,7 +48,7 @@ struct UnaryPathExecutor { static bool selectNodeIDs(common::ValueVector& input, common::SelectionVector& selectionVector) { auto nodesFieldIdx = 0; - KU_ASSERT(nodesFieldIdx == + RYU_ASSERT(nodesFieldIdx == common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::NODES)); auto nodesVector = common::StructVector::getFieldVector(&input, nodesFieldIdx).get(); auto internalIDFieldIdx = 0; @@ -58,7 +58,7 @@ struct UnaryPathExecutor { static bool selectRelIDs(common::ValueVector& input, common::SelectionVector& selectionVector) { auto relsFieldIdx = 1; - KU_ASSERT(relsFieldIdx == + RYU_ASSERT(relsFieldIdx == common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::RELS)); auto relsVector = common::StructVector::getFieldVector(&input, relsFieldIdx).get(); auto internalIDFieldIdx = 3; @@ -71,7 +71,7 @@ struct UnaryPathExecutor { common::ValueVector& listVector, common::struct_field_idx_t fieldIdx, common::ValueVector& result) { auto listDataVector = common::ListVector::getDataVector(&listVector); - KU_ASSERT(fieldIdx == common::StructType::getFieldIdx(listDataVector->dataType, + RYU_ASSERT(fieldIdx == common::StructType::getFieldIdx(listDataVector->dataType, common::InternalKeyword::ID)); auto internalIDsVector = common::StructVector::getFieldVector(listDataVector, fieldIdx).get(); @@ -98,7 +98,7 @@ struct UnaryPathExecutor { common::ValueVector& listVector, common::struct_field_idx_t fieldIdx, common::SelectionVector& selectionVector) { auto listDataVector = common::ListVector::getDataVector(&listVector); - KU_ASSERT(fieldIdx == common::StructType::getFieldIdx(listDataVector->dataType, + RYU_ASSERT(fieldIdx == common::StructType::getFieldIdx(listDataVector->dataType, common::InternalKeyword::ID)); auto internalIDsVector = common::StructVector::getFieldVector(listDataVector, fieldIdx).get(); diff --git a/src/include/function/scalar_function.h b/src/include/function/scalar_function.h index e3e80ded1d..89a2be0883 100644 --- a/src/include/function/scalar_function.h +++ b/src/include/function/scalar_function.h @@ -48,7 +48,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { static void TernaryExecFunction(const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 3); + RYU_ASSERT(params.size() == 3); TernaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], *params[2], paramSelVectors[2], result, resultSelVector, dataPtr); @@ -59,7 +59,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 3); + RYU_ASSERT(params.size() == 3); TernaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], *params[2], paramSelVectors[2], result, resultSelVector, dataPtr); @@ -80,7 +80,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 3); + RYU_ASSERT(params.size() == 3); TernaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], *params[2], paramSelVectors[2], result, resultSelVector, dataPtr); @@ -90,7 +90,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { static void BinaryExecFunction(const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::execute(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector); } @@ -100,7 +100,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector, dataPtr); @@ -111,7 +111,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector, dataPtr); @@ -122,7 +122,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector, dataPtr); @@ -132,7 +132,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { static bool BinarySelectFunction( const std::vector>& params, common::SelectionVector& selVector, void* dataPtr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); return BinaryFunctionExecutor::select(*params[0], *params[1], selVector, dataPtr); } @@ -141,7 +141,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { static bool BinarySelectWithBindData( const std::vector>& params, common::SelectionVector& selVector, void* dataPtr) { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); return BinaryFunctionExecutor::select(*params[0], *params[1], selVector, dataPtr); } @@ -151,7 +151,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { static void UnaryExecFunction(const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); EXECUTOR::template executeSwitch( *params[0], paramSelVectors[0], result, resultSelVector, dataPtr); } @@ -161,7 +161,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); UnaryFunctionExecutor::executeSequence(*params[0], paramSelVectors[0], result, resultSelVector, dataPtr); } @@ -171,7 +171,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); UnaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], result, resultSelVector, nullptr /* dataPtr */); @@ -183,7 +183,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); EXECUTOR::template executeSwitch(*params[0], paramSelVectors[0], result, resultSelVector, dataPtr); @@ -195,7 +195,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); EXECUTOR::template executeSwitch(*params[0], paramSelVectors[0], result, resultSelVector, dataPtr); } @@ -206,7 +206,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); EXECUTOR::template executeSwitch(*params[0], paramSelVectors[0], result, resultSelVector, dataPtr); @@ -218,7 +218,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { const std::vector>& params, const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); EXECUTOR::template executeSwitch( *params[0], paramSelVectors[0], result, resultSelVector, dataPtr); } @@ -229,7 +229,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { [[maybe_unused]] const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(params.empty() && paramSelVectors.empty()); + RYU_ASSERT(params.empty() && paramSelVectors.empty()); ConstFunctionExecutor::execute(result, *resultSelVector); } @@ -238,7 +238,7 @@ struct RYU_API ScalarFunction : public ScalarOrAggregateFunction { [[maybe_unused]] const std::vector>& params, [[maybe_unused]] const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(params.empty() && paramSelVectors.empty()); + RYU_ASSERT(params.empty() && paramSelVectors.empty()); PointerFunctionExecutor::execute(result, *resultSelVector, dataPtr); } diff --git a/src/include/function/string/functions/pad_function.h b/src/include/function/string/functions/pad_function.h index a7dd61b95b..21634980f2 100644 --- a/src/include/function/string/functions/pad_function.h +++ b/src/include/function/string/functions/pad_function.h @@ -18,7 +18,7 @@ struct PadOperation { result.set("", 0); return; } - KU_ASSERT(characterToPad.len == 1); + RYU_ASSERT(characterToPad.len == 1); padOperation(result, src, characterToPad); common::StringVector::addString(&resultValueVector, result, (const char*)result.getData(), count); diff --git a/src/include/function/ternary_function_executor.h b/src/include/function/ternary_function_executor.h index de4ddc0479..56a2d4c264 100644 --- a/src/include/function/ternary_function_executor.h +++ b/src/include/function/ternary_function_executor.h @@ -130,7 +130,7 @@ struct TernaryFunctionExecutor { common::ValueVector& b, common::SelectionVector* bSelVector, common::ValueVector& c, [[maybe_unused]] common::SelectionVector* cSelVector, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(bSelVector == cSelVector); + RYU_ASSERT(bSelVector == cSelVector); auto aPos = (*aSelVector)[0]; if (a.isNull(aPos)) { result.setAllNull(); @@ -227,7 +227,7 @@ struct TernaryFunctionExecutor { common::ValueVector& b, [[maybe_unused]] common::SelectionVector* bSelVector, common::ValueVector& c, [[maybe_unused]] common::SelectionVector* cSelVector, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(aSelVector == bSelVector && bSelVector == cSelVector); + RYU_ASSERT(aSelVector == bSelVector && bSelVector == cSelVector); if (a.hasNoNullsGuarantee() && b.hasNoNullsGuarantee() && c.hasNoNullsGuarantee()) { if (aSelVector->isUnfiltered()) { for (uint64_t i = 0; i < aSelVector->getSelSize(); i++) { @@ -322,7 +322,7 @@ struct TernaryFunctionExecutor { common::ValueVector& b, common::SelectionVector* bSelVector, common::ValueVector& c, [[maybe_unused]] common::SelectionVector* cSelVector, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(aSelVector == cSelVector); + RYU_ASSERT(aSelVector == cSelVector); auto bPos = (*bSelVector)[0]; if (b.isNull(bPos)) { result.setAllNull(); @@ -371,7 +371,7 @@ struct TernaryFunctionExecutor { common::ValueVector& b, [[maybe_unused]] common::SelectionVector* bSelVector, common::ValueVector& c, common::SelectionVector* cSelVector, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr) { - KU_ASSERT(aSelVector == bSelVector); + RYU_ASSERT(aSelVector == bSelVector); auto cPos = (*cSelVector)[0]; if (c.isNull(cPos)) { result.setAllNull(); @@ -446,7 +446,7 @@ struct TernaryFunctionExecutor { executeUnflatFlatUnflat(a, aSelVector, b, bSelVector, c, cSelVector, result, resultSelVector, dataPtr); } else { - KU_ASSERT(false); + RYU_ASSERT(false); } } }; diff --git a/src/include/function/udf_function.h b/src/include/function/udf_function.h index 38e45c40cd..bf31d4bd96 100644 --- a/src/include/function/udf_function.h +++ b/src/include/function/udf_function.h @@ -61,19 +61,19 @@ struct UDF { template static function::scalar_func_exec_t createEmptyParameterExecFunc(RESULT_TYPE (*)(Args...), const std::vector&) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } template static function::scalar_func_exec_t createEmptyParameterExecFunc(RESULT_TYPE (*udfFunc)(), const std::vector&) { - KU_UNUSED(udfFunc); // Disable compiler warnings. + RYU_UNUSED(udfFunc); // Disable compiler warnings. return [udfFunc]( [[maybe_unused]] const std::vector>& params, [[maybe_unused]] const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) -> void { - KU_ASSERT(params.empty() && paramSelVectors.empty()); + RYU_ASSERT(params.empty() && paramSelVectors.empty()); for (auto i = 0u; i < resultSelVector->getSelSize(); ++i) { auto resultPos = (*resultSelVector)[i]; result.copyFromValue(resultPos, common::Value(udfFunc())); @@ -84,7 +84,7 @@ struct UDF { template static function::scalar_func_exec_t createUnaryExecFunc(RESULT_TYPE (* /*udfFunc*/)(Args...), const std::vector& /*parameterTypes*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } template @@ -101,7 +101,7 @@ struct UDF { const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) -> void { - KU_ASSERT(params.size() == 1); + RYU_ASSERT(params.size() == 1); UnaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], result, resultSelVector, (void*)udfFunc); @@ -112,7 +112,7 @@ struct UDF { template static function::scalar_func_exec_t createBinaryExecFunc(RESULT_TYPE (* /*udfFunc*/)(Args...), const std::vector& /*parameterTypes*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } template @@ -131,7 +131,7 @@ struct UDF { const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) -> void { - KU_ASSERT(params.size() == 2); + RYU_ASSERT(params.size() == 2); BinaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], result, resultSelVector, (void*)udfFunc); @@ -142,7 +142,7 @@ struct UDF { template static function::scalar_func_exec_t createTernaryExecFunc(RESULT_TYPE (* /*udfFunc*/)(Args...), const std::vector& /*parameterTypes*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } template @@ -162,7 +162,7 @@ struct UDF { const std::vector& paramSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) -> void { - KU_ASSERT(params.size() == 3); + RYU_ASSERT(params.size() == 3); TernaryFunctionExecutor::executeSwitch(*params[0], paramSelVectors[0], *params[1], paramSelVectors[1], *params[2], paramSelVectors[2], result, @@ -218,7 +218,7 @@ struct UDF { } else if (std::is_same()) { return common::LogicalTypeID::STRING; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -247,7 +247,7 @@ struct UDF { std::vector parameterTypes, common::LogicalTypeID returnType) { function_set definitions; if (returnType == common::LogicalTypeID::STRING) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } validateType(returnType); scalar_func_exec_t scalarExecFunc = getScalarExecFunc(udfFunc, parameterTypes); diff --git a/src/include/graph/graph_entry_set.h b/src/include/graph/graph_entry_set.h index ce6f00d470..3bdb6deab7 100644 --- a/src/include/graph/graph_entry_set.h +++ b/src/include/graph/graph_entry_set.h @@ -19,7 +19,7 @@ class GraphEntrySet { bool hasGraph(const std::string& name) const { return nameToEntry.contains(name); } ParsedGraphEntry* getEntry(const std::string& name) const { - KU_ASSERT(hasGraph(name)); + RYU_ASSERT(hasGraph(name)); return nameToEntry.at(name).get(); } void addGraph(const std::string& name, std::unique_ptr entry) { diff --git a/src/include/graph/on_disk_graph.h b/src/include/graph/on_disk_graph.h index 7feb8c7c5e..be91ad5d8e 100644 --- a/src/include/graph/on_disk_graph.h +++ b/src/include/graph/on_disk_graph.h @@ -49,7 +49,7 @@ class OnDiskGraphNbrScanState : public NbrScanState { std::span getNbrNodes() const { RUNTIME_CHECK(for (size_t i = 0; i < getSelVector().getSelSize(); i++) { - KU_ASSERT( + RYU_ASSERT( getSelVector().getSelectedPositions()[i] < common::DEFAULT_VECTOR_CAPACITY); }); return std::span(&dstVector().getValue(0), diff --git a/src/include/main/plan_printer.h b/src/include/main/plan_printer.h index ce05436787..0e51ac3e22 100644 --- a/src/include/main/plan_printer.h +++ b/src/include/main/plan_printer.h @@ -68,7 +68,7 @@ class OpProfileTree { static std::string genHorizLine(uint32_t len); inline void validateRowIdxAndColIdx(uint32_t rowIdx, uint32_t colIdx) const { - KU_ASSERT(rowIdx < opProfileBoxes.size() && colIdx < opProfileBoxes[rowIdx].size()); + RYU_ASSERT(rowIdx < opProfileBoxes.size() && colIdx < opProfileBoxes[rowIdx].size()); (void)rowIdx; (void)colIdx; } diff --git a/src/include/parser/expression/parsed_expression.h b/src/include/parser/expression/parsed_expression.h index c06bf8aa46..bb59e4f376 100644 --- a/src/include/parser/expression/parsed_expression.h +++ b/src/include/parser/expression/parsed_expression.h @@ -57,7 +57,7 @@ class RYU_API ParsedExpression { common::idx_t getNumChildren() const { return children.size(); } ParsedExpression* getChild(common::idx_t idx) const { return children[idx].get(); } void setChild(common::idx_t idx, std::unique_ptr child) { - KU_ASSERT(idx < children.size()); + RYU_ASSERT(idx < children.size()); children[idx] = std::move(child); } diff --git a/src/include/parser/expression/parsed_parameter_expression.h b/src/include/parser/expression/parsed_parameter_expression.h index bc9b5d55a4..8c76d52dba 100644 --- a/src/include/parser/expression/parsed_parameter_expression.h +++ b/src/include/parser/expression/parsed_parameter_expression.h @@ -15,13 +15,13 @@ class ParsedParameterExpression : public ParsedExpression { inline std::string getParameterName() const { return parameterName; } static std::unique_ptr deserialize(common::Deserializer&) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } - inline std::unique_ptr copy() const override { KU_UNREACHABLE; } + inline std::unique_ptr copy() const override { RYU_UNREACHABLE; } private: - void serializeInternal(common::Serializer&) const override { KU_UNREACHABLE; } + void serializeInternal(common::Serializer&) const override { RYU_UNREACHABLE; } private: std::string parameterName; diff --git a/src/include/parser/expression/parsed_subquery_expression.h b/src/include/parser/expression/parsed_subquery_expression.h index 16ae9feeb9..a21a280549 100644 --- a/src/include/parser/expression/parsed_subquery_expression.h +++ b/src/include/parser/expression/parsed_subquery_expression.h @@ -37,13 +37,13 @@ class ParsedSubqueryExpression : public ParsedExpression { std::shared_ptr getHint() const { return hintRoot; } static std::unique_ptr deserialize(common::Deserializer&) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } - std::unique_ptr copy() const override { KU_UNREACHABLE; } + std::unique_ptr copy() const override { RYU_UNREACHABLE; } private: - void serializeInternal(common::Serializer&) const override { KU_UNREACHABLE; } + void serializeInternal(common::Serializer&) const override { RYU_UNREACHABLE; } private: common::SubqueryType subqueryType; diff --git a/src/include/parser/query/single_query.h b/src/include/parser/query/single_query.h index 53268f992d..a7c01181f8 100644 --- a/src/include/parser/query/single_query.h +++ b/src/include/parser/query/single_query.h @@ -35,7 +35,7 @@ class SingleQuery { inline void setReturnClause(ReturnClause clause) { returnClause = std::move(clause); } inline bool hasReturnClause() const { return returnClause.has_value(); } inline const ReturnClause* getReturnClause() const { - KU_ASSERT(returnClause.has_value()); + RYU_ASSERT(returnClause.has_value()); return &returnClause.value(); } diff --git a/src/include/parser/transformer.h b/src/include/parser/transformer.h index eeaf3193d4..460c13e0cc 100644 --- a/src/include/parser/transformer.h +++ b/src/include/parser/transformer.h @@ -53,28 +53,28 @@ class Transformer { std::string transformSchemaName(CypherParser::OC_SchemaNameContext& ctx); static std::string transformSymbolicName(CypherParser::OC_SymbolicNameContext& ctx); static std::string transformStringLiteral(antlr4::tree::TerminalNode& stringLiteral); - static common::ConflictAction transformConflictAction(CypherParser::KU_IfNotExistsContext* ctx); + static common::ConflictAction transformConflictAction(CypherParser::RU_IfNotExistsContext* ctx); // Transform copy statement. - std::unique_ptr transformCopyTo(CypherParser::KU_CopyTOContext& ctx); - std::unique_ptr transformCopyFrom(CypherParser::KU_CopyFromContext& ctx); + std::unique_ptr transformCopyTo(CypherParser::RU_CopyTOContext& ctx); + std::unique_ptr transformCopyFrom(CypherParser::RU_CopyFromContext& ctx); std::unique_ptr transformCopyFromByColumn( - CypherParser::KU_CopyFromByColumnContext& ctx); - std::vector transformColumnNames(CypherParser::KU_ColumnNamesContext& ctx); + CypherParser::RU_CopyFromByColumnContext& ctx); + std::vector transformColumnNames(CypherParser::RU_ColumnNamesContext& ctx); std::vector transformFilePaths( const std::vector& stringLiteral); - std::unique_ptr transformScanSource(CypherParser::KU_ScanSourceContext& ctx); - options_t transformOptions(CypherParser::KU_OptionsContext& ctx); + std::unique_ptr transformScanSource(CypherParser::RU_ScanSourceContext& ctx); + options_t transformOptions(CypherParser::RU_OptionsContext& ctx); - std::unique_ptr transformExportDatabase(CypherParser::KU_ExportDatabaseContext& ctx); - std::unique_ptr transformImportDatabase(CypherParser::KU_ImportDatabaseContext& ctx); + std::unique_ptr transformExportDatabase(CypherParser::RU_ExportDatabaseContext& ctx); + std::unique_ptr transformImportDatabase(CypherParser::RU_ImportDatabaseContext& ctx); // Transform query statement. std::unique_ptr transformQuery(CypherParser::OC_QueryContext& ctx); std::unique_ptr transformRegularQuery(CypherParser::OC_RegularQueryContext& ctx); SingleQuery transformSingleQuery(CypherParser::OC_SingleQueryContext& ctx); SingleQuery transformSinglePartQuery(CypherParser::OC_SinglePartQueryContext& ctx); - QueryPart transformQueryPart(CypherParser::KU_QueryPartContext& ctx); + QueryPart transformQueryPart(CypherParser::RU_QueryPartContext& ctx); // Transform updating. std::unique_ptr transformUpdatingClause( @@ -91,9 +91,9 @@ class Transformer { std::unique_ptr transformMatch(CypherParser::OC_MatchContext& ctx); std::unique_ptr transformUnwind(CypherParser::OC_UnwindContext& ctx); std::vector transformYieldVariables(CypherParser::OC_YieldItemsContext& ctx); - std::unique_ptr transformInQueryCall(CypherParser::KU_InQueryCallContext& ctx); - std::unique_ptr transformLoadFrom(CypherParser::KU_LoadFromContext& ctx); - std::shared_ptr transformJoinHint(CypherParser::KU_JoinNodeContext& ctx); + std::unique_ptr transformInQueryCall(CypherParser::RU_InQueryCallContext& ctx); + std::unique_ptr transformLoadFrom(CypherParser::RU_LoadFromContext& ctx); + std::shared_ptr transformJoinHint(CypherParser::RU_JoinNodeContext& ctx); // Transform projection. WithClause transformWith(CypherParser::OC_WithContext& ctx); @@ -113,7 +113,7 @@ class Transformer { PatternElementChain transformPatternElementChain( CypherParser::OC_PatternElementChainContext& ctx); RelPattern transformRelationshipPattern(CypherParser::OC_RelationshipPatternContext& ctx); - std::vector transformProperties(CypherParser::KU_PropertiesContext& ctx); + std::vector transformProperties(CypherParser::RU_PropertiesContext& ctx); std::vector transformRelTypes(CypherParser::OC_RelationshipTypesContext& ctx); std::vector transformNodeLabels(CypherParser::OC_NodeLabelsContext& ctx); std::string transformLabelName(CypherParser::OC_LabelNameContext& ctx); @@ -132,11 +132,11 @@ class Transformer { std::unique_ptr transformComparisonExpression( CypherParser::OC_ComparisonExpressionContext& ctx); std::unique_ptr transformBitwiseOrOperatorExpression( - CypherParser::KU_BitwiseOrOperatorExpressionContext& ctx); + CypherParser::RU_BitwiseOrOperatorExpressionContext& ctx); std::unique_ptr transformBitwiseAndOperatorExpression( - CypherParser::KU_BitwiseAndOperatorExpressionContext& ctx); + CypherParser::RU_BitwiseAndOperatorExpressionContext& ctx); std::unique_ptr transformBitShiftOperatorExpression( - CypherParser::KU_BitShiftOperatorExpressionContext& ctx); + CypherParser::RU_BitShiftOperatorExpressionContext& ctx); std::unique_ptr transformAddOrSubtractExpression( CypherParser::OC_AddOrSubtractExpressionContext& ctx); std::unique_ptr transformMultiplyDivideModuloExpression( @@ -165,7 +165,7 @@ class Transformer { std::unique_ptr transformListLiteral( CypherParser::OC_ListLiteralContext& ctx); std::unique_ptr transformStructLiteral( - CypherParser::KU_StructLiteralContext& ctx); + CypherParser::RU_StructLiteralContext& ctx); std::unique_ptr transformParameterExpression( CypherParser::OC_ParameterContext& ctx); std::unique_ptr transformParenthesizedExpression( @@ -173,11 +173,11 @@ class Transformer { std::unique_ptr transformFunctionInvocation( CypherParser::OC_FunctionInvocationContext& ctx); std::string transformFunctionName(CypherParser::OC_FunctionNameContext& ctx); - std::vector transformLambdaVariables(CypherParser::KU_LambdaVarsContext& ctx); + std::vector transformLambdaVariables(CypherParser::RU_LambdaVarsContext& ctx); std::unique_ptr transformLambdaParameter( - CypherParser::KU_LambdaParameterContext& ctx); + CypherParser::RU_LambdaParameterContext& ctx); std::unique_ptr transformFunctionParameterExpression( - CypherParser::KU_FunctionParameterContext& ctx); + CypherParser::RU_FunctionParameterContext& ctx); std::unique_ptr transformPathPattern( CypherParser::OC_PathPatternsContext& ctx); std::unique_ptr transformExistCountSubquery( @@ -202,53 +202,53 @@ class Transformer { CypherParser::OC_DoubleLiteralContext& ctx, bool negative); // Transform ddl. - std::unique_ptr transformAlterTable(CypherParser::KU_AlterTableContext& ctx); + std::unique_ptr transformAlterTable(CypherParser::RU_AlterTableContext& ctx); std::unique_ptr transformCreateNodeTable( - CypherParser::KU_CreateNodeTableContext& ctx); - std::unique_ptr transformCreateRelGroup(CypherParser::KU_CreateRelTableContext& ctx); - std::unique_ptr transformCreateSequence(CypherParser::KU_CreateSequenceContext& ctx); - std::unique_ptr transformCreateType(CypherParser::KU_CreateTypeContext& ctx); - std::unique_ptr transformDrop(CypherParser::KU_DropContext& ctx); - std::unique_ptr transformRenameTable(CypherParser::KU_AlterTableContext& ctx); + CypherParser::RU_CreateNodeTableContext& ctx); + std::unique_ptr transformCreateRelGroup(CypherParser::RU_CreateRelTableContext& ctx); + std::unique_ptr transformCreateSequence(CypherParser::RU_CreateSequenceContext& ctx); + std::unique_ptr transformCreateType(CypherParser::RU_CreateTypeContext& ctx); + std::unique_ptr transformDrop(CypherParser::RU_DropContext& ctx); + std::unique_ptr transformRenameTable(CypherParser::RU_AlterTableContext& ctx); std::unique_ptr transformAddFromToConnection( - CypherParser::KU_AlterTableContext& ctx); + CypherParser::RU_AlterTableContext& ctx); std::unique_ptr transformDropFromToConnection( - CypherParser::KU_AlterTableContext& ctx); - std::unique_ptr transformAddProperty(CypherParser::KU_AlterTableContext& ctx); - std::unique_ptr transformDropProperty(CypherParser::KU_AlterTableContext& ctx); - std::unique_ptr transformRenameProperty(CypherParser::KU_AlterTableContext& ctx); - std::unique_ptr transformCommentOn(CypherParser::KU_CommentOnContext& ctx); - std::string transformUnionType(CypherParser::KU_UnionTypeContext& ctx); - std::string transformStructType(CypherParser::KU_StructTypeContext& ctx); - std::string transformMapType(CypherParser::KU_MapTypeContext& ctx); - std::string transformDecimalType(CypherParser::KU_DecimalTypeContext& ctx); - std::string transformDataType(CypherParser::KU_DataTypeContext& ctx); - std::string getPKName(CypherParser::KU_CreateNodeTableContext& ctx); - std::string transformPrimaryKey(CypherParser::KU_CreateNodeConstraintContext& ctx); - std::string transformPrimaryKey(CypherParser::KU_ColumnDefinitionContext& ctx); + CypherParser::RU_AlterTableContext& ctx); + std::unique_ptr transformAddProperty(CypherParser::RU_AlterTableContext& ctx); + std::unique_ptr transformDropProperty(CypherParser::RU_AlterTableContext& ctx); + std::unique_ptr transformRenameProperty(CypherParser::RU_AlterTableContext& ctx); + std::unique_ptr transformCommentOn(CypherParser::RU_CommentOnContext& ctx); + std::string transformUnionType(CypherParser::RU_UnionTypeContext& ctx); + std::string transformStructType(CypherParser::RU_StructTypeContext& ctx); + std::string transformMapType(CypherParser::RU_MapTypeContext& ctx); + std::string transformDecimalType(CypherParser::RU_DecimalTypeContext& ctx); + std::string transformDataType(CypherParser::RU_DataTypeContext& ctx); + std::string getPKName(CypherParser::RU_CreateNodeTableContext& ctx); + std::string transformPrimaryKey(CypherParser::RU_CreateNodeConstraintContext& ctx); + std::string transformPrimaryKey(CypherParser::RU_ColumnDefinitionContext& ctx); std::vector transformColumnDefinitions( - CypherParser::KU_ColumnDefinitionsContext& ctx); - ParsedColumnDefinition transformColumnDefinition(CypherParser::KU_ColumnDefinitionContext& ctx); + CypherParser::RU_ColumnDefinitionsContext& ctx); + ParsedColumnDefinition transformColumnDefinition(CypherParser::RU_ColumnDefinitionContext& ctx); std::vector transformPropertyDefinitions( - CypherParser::KU_PropertyDefinitionsContext& ctx); + CypherParser::RU_PropertyDefinitionsContext& ctx); // Transform standalone call. - std::unique_ptr transformStandaloneCall(CypherParser::KU_StandaloneCallContext& ctx); + std::unique_ptr transformStandaloneCall(CypherParser::RU_StandaloneCallContext& ctx); // Transform create macro. - std::unique_ptr transformCreateMacro(CypherParser::KU_CreateMacroContext& ctx); - std::vector transformPositionalArgs(CypherParser::KU_PositionalArgsContext& ctx); + std::unique_ptr transformCreateMacro(CypherParser::RU_CreateMacroContext& ctx); + std::vector transformPositionalArgs(CypherParser::RU_PositionalArgsContext& ctx); // Transform transaction. - std::unique_ptr transformTransaction(CypherParser::KU_TransactionContext& ctx); + std::unique_ptr transformTransaction(CypherParser::RU_TransactionContext& ctx); // Transform extension. - std::unique_ptr transformExtension(CypherParser::KU_ExtensionContext& ctx); + std::unique_ptr transformExtension(CypherParser::RU_ExtensionContext& ctx); // Transform attach/detach/use database. - std::unique_ptr transformAttachDatabase(CypherParser::KU_AttachDatabaseContext& ctx); - std::unique_ptr transformDetachDatabase(CypherParser::KU_DetachDatabaseContext& ctx); - std::unique_ptr transformUseDatabase(CypherParser::KU_UseDatabaseContext& ctx); + std::unique_ptr transformAttachDatabase(CypherParser::RU_AttachDatabaseContext& ctx); + std::unique_ptr transformDetachDatabase(CypherParser::RU_DetachDatabaseContext& ctx); + std::unique_ptr transformUseDatabase(CypherParser::RU_UseDatabaseContext& ctx); std::unique_ptr transformExtensionStatement(antlr4::ParserRuleContext* ctx); diff --git a/src/include/planner/operator/extend/base_logical_extend.h b/src/include/planner/operator/extend/base_logical_extend.h index 23914d43df..0c02986166 100644 --- a/src/include/planner/operator/extend/base_logical_extend.h +++ b/src/include/planner/operator/extend/base_logical_extend.h @@ -36,7 +36,7 @@ struct BaseLogicalExtendPrintInfo : OPPrintInfo { nbrNode->toString() + ")"; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/include/planner/operator/logical_partitioner.h b/src/include/planner/operator/logical_partitioner.h index 7525aab254..702d99fec5 100644 --- a/src/include/planner/operator/logical_partitioner.h +++ b/src/include/planner/operator/logical_partitioner.h @@ -31,11 +31,11 @@ struct LogicalPartitionerInfo { common::idx_t getNumInfos() const { return partitioningInfos.size(); } LogicalPartitioningInfo& getInfo(common::idx_t idx) { - KU_ASSERT(idx < partitioningInfos.size()); + RYU_ASSERT(idx < partitioningInfos.size()); return partitioningInfos[idx]; } const LogicalPartitioningInfo& getInfo(common::idx_t idx) const { - KU_ASSERT(idx < partitioningInfos.size()); + RYU_ASSERT(idx < partitioningInfos.size()); return partitioningInfos[idx]; } }; diff --git a/src/include/planner/operator/logical_plan.h b/src/include/planner/operator/logical_plan.h index ea517d779b..10aeb360e6 100644 --- a/src/include/planner/operator/logical_plan.h +++ b/src/include/planner/operator/logical_plan.h @@ -22,13 +22,13 @@ class RYU_API LogicalPlan { std::shared_ptr getLastOperator() const { return lastOperator; } LogicalOperator& getLastOperatorRef() const { - KU_ASSERT(lastOperator); + RYU_ASSERT(lastOperator); return *lastOperator; } Schema* getSchema() const { return lastOperator->getSchema(); } cardinality_t getCardinality() const { - KU_ASSERT(lastOperator); + RYU_ASSERT(lastOperator); return lastOperator->getCardinality(); } diff --git a/src/include/planner/operator/persistent/logical_delete.h b/src/include/planner/operator/persistent/logical_delete.h index c61ba56126..707203ad22 100644 --- a/src/include/planner/operator/persistent/logical_delete.h +++ b/src/include/planner/operator/persistent/logical_delete.h @@ -30,7 +30,7 @@ class LogicalDelete final : public LogicalOperator { : LogicalOperator{type_, std::move(child)}, infos{std::move(infos)} {} common::TableType getTableType() const { - KU_ASSERT(!infos.empty()); + RYU_ASSERT(!infos.empty()); return infos[0].tableType; } const std::vector& getInfos() const { return infos; } diff --git a/src/include/planner/operator/schema.h b/src/include/planner/operator/schema.h index e8559b8480..93c737b326 100644 --- a/src/include/planner/operator/schema.h +++ b/src/include/planner/operator/schema.h @@ -23,12 +23,12 @@ class FactorizationGroup { expressionNameToPos{other.expressionNameToPos} {} void setFlat() { - KU_ASSERT(!flat); + RYU_ASSERT(!flat); flat = true; } bool isFlat() const { return flat; } void setSingleState() { - KU_ASSERT(!singleState); + RYU_ASSERT(!singleState); singleState = true; setFlat(); } @@ -38,13 +38,13 @@ class FactorizationGroup { double getMultiplier() const { return cardinalityMultiplier; } void insertExpression(const std::shared_ptr& expression) { - KU_ASSERT(!expressionNameToPos.contains(expression->getUniqueName())); + RYU_ASSERT(!expressionNameToPos.contains(expression->getUniqueName())); expressionNameToPos.insert({expression->getUniqueName(), expressions.size()}); expressions.push_back(expression); } binder::expression_vector getExpressions() const { return expressions; } uint32_t getExpressionPos(const binder::Expression& expression) const { - KU_ASSERT(expressionNameToPos.contains(expression.getUniqueName())); + RYU_ASSERT(expressionNameToPos.contains(expression.getUniqueName())); return expressionNameToPos.at(expression.getUniqueName()); } diff --git a/src/include/processor/operator/aggregate/aggregate_hash_table.h b/src/include/processor/operator/aggregate/aggregate_hash_table.h index 4670618e1c..03d104031e 100644 --- a/src/include/processor/operator/aggregate/aggregate_hash_table.h +++ b/src/include/processor/operator/aggregate/aggregate_hash_table.h @@ -194,7 +194,7 @@ class AggregateHashTable : public BaseHashTable { void fillHashSlot(common::hash_t hash, uint8_t* groupByKeysAndAggregateStateBuffer); inline HashSlot* getHashSlot(uint64_t slotIdx) { - KU_ASSERT(slotIdx < maxNumHashSlots); + RYU_ASSERT(slotIdx < maxNumHashSlots); // If the slotIdx is smaller than the numHashSlotsPerBlock, then the hashSlot must be // in the first hashSlotsBlock. We don't need to compute the blockIdx and blockOffset. return slotIdx < ((uint64_t)1 << numSlotsPerBlockLog2) ? diff --git a/src/include/processor/operator/aggregate/hash_aggregate.h b/src/include/processor/operator/aggregate/hash_aggregate.h index dc672ec513..0f21de27b4 100644 --- a/src/include/processor/operator/aggregate/hash_aggregate.h +++ b/src/include/processor/operator/aggregate/hash_aggregate.h @@ -186,7 +186,7 @@ class HashAggregateFinalize final : public Sink { bool isSource() const override { return true; } void executeInternal(ExecutionContext* /*context*/) override { - KU_ASSERT(sharedState->isReadyForFinalization()); + RYU_ASSERT(sharedState->isReadyForFinalization()); sharedState->finalizePartitions(); } void finalizeInternal(ExecutionContext* /*context*/) override { diff --git a/src/include/processor/operator/hash_join/join_hash_table.h b/src/include/processor/operator/hash_join/join_hash_table.h index 40088f6275..ba13cb6889 100644 --- a/src/include/processor/operator/hash_join/join_hash_table.h +++ b/src/include/processor/operator/hash_join/join_hash_table.h @@ -48,7 +48,7 @@ class JoinHashTable : public BaseHashTable { } uint8_t* getTupleForHash(common::hash_t hash) { auto slotIdx = getSlotIdxForHash(hash); - KU_ASSERT(slotIdx < maxNumHashSlots); + RYU_ASSERT(slotIdx < maxNumHashSlots); return ((uint8_t**)(hashSlotsBlocks[slotIdx >> numSlotsPerBlockLog2] ->getData()))[slotIdx & slotIdxInBlockMask]; } diff --git a/src/include/processor/operator/intersect/intersect_build.h b/src/include/processor/operator/intersect/intersect_build.h index e0e16de2ce..d0625a86d7 100644 --- a/src/include/processor/operator/intersect/intersect_build.h +++ b/src/include/processor/operator/intersect/intersect_build.h @@ -43,7 +43,7 @@ class IntersectBuild final : public HashJoinBuild { std::move(printInfo)} {} uint64_t appendVectors() final { - KU_ASSERT(keyVectors.size() == 1); + RYU_ASSERT(keyVectors.size() == 1); return hashTable->appendVectorWithSorting(keyVectors[0], payloadVectors); } diff --git a/src/include/processor/operator/order_by/key_block_merger.h b/src/include/processor/operator/order_by/key_block_merger.h index 5c0c33b61b..07ee2925c7 100644 --- a/src/include/processor/operator/order_by/key_block_merger.h +++ b/src/include/processor/operator/order_by/key_block_merger.h @@ -36,7 +36,7 @@ class MergedKeyBlocks { MergedKeyBlocks(uint32_t numBytesPerTuple, std::shared_ptr keyBlock); inline uint8_t* getTuple(uint64_t tupleIdx) const { - KU_ASSERT(tupleIdx < numTuples); + RYU_ASSERT(tupleIdx < numTuples); return keyBlocks[tupleIdx / numTuplesPerBlock]->getData() + numBytesPerTuple * (tupleIdx % numTuplesPerBlock); } @@ -48,7 +48,7 @@ class MergedKeyBlocks { inline uint32_t getNumTuplesPerBlock() const { return numTuplesPerBlock; } inline uint8_t* getKeyBlockBuffer(uint32_t idx) const { - KU_ASSERT(idx < keyBlocks.size()); + RYU_ASSERT(idx < keyBlocks.size()); return keyBlocks[idx]->getData(); } diff --git a/src/include/processor/operator/order_by/order_by_key_encoder.h b/src/include/processor/operator/order_by/order_by_key_encoder.h index ad55b6f43b..cd187ddffc 100644 --- a/src/include/processor/operator/order_by/order_by_key_encoder.h +++ b/src/include/processor/operator/order_by/order_by_key_encoder.h @@ -89,7 +89,7 @@ class OrderByKeyEncoder { template static void encodeData(type /*data*/, uint8_t* /*resultPtr*/, bool /*swapBytes*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } static inline uint8_t flipSign(uint8_t key_byte) { return key_byte ^ 128; } diff --git a/src/include/processor/operator/partitioner.h b/src/include/processor/operator/partitioner.h index 6df003de8b..429c66d73a 100644 --- a/src/include/processor/operator/partitioner.h +++ b/src/include/processor/operator/partitioner.h @@ -59,10 +59,10 @@ struct CopyPartitionerSharedState : public PartitionerSharedState { // need to be freed after its processed. std::unique_ptr getPartitionBuffer( common::idx_t partitioningIdx, common::partition_idx_t partitionIdx) const { - KU_ASSERT(partitioningIdx < partitioningBuffers.size()); - KU_ASSERT(partitionIdx < partitioningBuffers[partitioningIdx]->partitions.size()); + RYU_ASSERT(partitioningIdx < partitioningBuffers.size()); + RYU_ASSERT(partitionIdx < partitioningBuffers[partitioningIdx]->partitions.size()); - KU_ASSERT(partitioningBuffers[partitioningIdx]->partitions[partitionIdx].get()); + RYU_ASSERT(partitioningBuffers[partitioningIdx]->partitions[partitionIdx].get()); auto partitioningBuffer = std::move(partitioningBuffers[partitioningIdx]->partitions[partitionIdx]); // This may still run out of memory if there isn't enough space for one partitioningBuffer @@ -76,7 +76,7 @@ struct PartitionerLocalState { std::vector> partitioningBuffers; PartitioningBuffer* getPartitioningBuffer(common::partition_idx_t partitioningIdx) const { - KU_ASSERT(partitioningIdx < partitioningBuffers.size()); + RYU_ASSERT(partitioningIdx < partitioningBuffers.size()); return partitioningBuffers[partitioningIdx].get(); } }; diff --git a/src/include/processor/operator/persistent/reader/copy_from_error.h b/src/include/processor/operator/persistent/reader/copy_from_error.h index a7ab3b3e51..88d5ef65ef 100644 --- a/src/include/processor/operator/persistent/reader/copy_from_error.h +++ b/src/include/processor/operator/persistent/reader/copy_from_error.h @@ -89,7 +89,7 @@ struct PopulatedCopyFromError { template void WarningSourceData::dumpTo(uint64_t& blockIdx, uint32_t& offsetInBlock, Types&... vars) const { static_assert(sizeof...(Types) + NUM_BLOCK_VALUES <= std::tuple_size_v); - KU_ASSERT(sizeof...(Types) + NUM_BLOCK_VALUES == numValues); + RYU_ASSERT(sizeof...(Types) + NUM_BLOCK_VALUES == numValues); common::TypeUtils::paramPackForEach( [this](auto idx, auto& value) { value = std::get>(values[idx]); diff --git a/src/include/processor/operator/persistent/reader/csv/base_csv_reader.h b/src/include/processor/operator/persistent/reader/csv/base_csv_reader.h index e3c8dc42ad..50dcdac74c 100644 --- a/src/include/processor/operator/persistent/reader/csv/base_csv_reader.h +++ b/src/include/processor/operator/persistent/reader/csv/base_csv_reader.h @@ -62,7 +62,7 @@ class BaseCSVReader { uint64_t getNumColumns() const { return columnInfo.numColumns; } bool skipColumn(common::idx_t idx) const { - KU_ASSERT(idx < columnInfo.columnSkips.size()); + RYU_ASSERT(idx < columnInfo.columnSkips.size()); return columnInfo.columnSkips[idx]; } bool isEOF() const; diff --git a/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h index 72ca2fadd9..bf68d45c3c 100644 --- a/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h @@ -7,13 +7,13 @@ namespace ryu { namespace processor { -template +template class CallbackColumnReader - : public TemplatedColumnReader> { - using BaseType = TemplatedColumnReader>; + : public TemplatedColumnReader> { + using BaseType = TemplatedColumnReader>; public: static constexpr const common::PhysicalTypeID TYPE = common::PhysicalTypeID::ANY; @@ -22,15 +22,15 @@ class CallbackColumnReader CallbackColumnReader(ParquetReader& reader, common::LogicalType type_p, const ryu_parquet::format::SchemaElement& schema_p, uint64_t file_idx_p, uint64_t max_define_p, uint64_t max_repeat_p) - : TemplatedColumnReader>(reader, + : TemplatedColumnReader>(reader, std::move(type_p), schema_p, file_idx_p, max_define_p, max_repeat_p) {} protected: void dictionary(const std::shared_ptr& dictionaryData, uint64_t numEntries) override { - BaseType::allocateDict(numEntries * sizeof(KU_PHYSICAL_TYPE)); - auto dictPtr = (KU_PHYSICAL_TYPE*)this->dict->ptr; + BaseType::allocateDict(numEntries * sizeof(RYU_PHYSICAL_TYPE)); + auto dictPtr = (RYU_PHYSICAL_TYPE*)this->dict->ptr; for (auto i = 0u; i < numEntries; i++) { dictPtr[i] = FUNC(dictionaryData->read()); } diff --git a/src/include/processor/operator/persistent/reader/parquet/column_reader.h b/src/include/processor/operator/persistent/reader/parquet/column_reader.h index b8f235a8c6..18c27e8820 100644 --- a/src/include/processor/operator/persistent/reader/parquet/column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/column_reader.h @@ -29,16 +29,16 @@ class ColumnReader { virtual void skip(uint64_t numValues) { pendingSkips += numValues; } virtual void dictionary(const std::shared_ptr& /*data*/, uint64_t /*num_entries*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } virtual void offsets(uint32_t* /*offsets*/, uint8_t* /*defines*/, uint64_t /*numValues*/, parquet_filter_t& /*filter*/, uint64_t /*resultOffset*/, common::ValueVector* /*result*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } virtual void plain(const std::shared_ptr& /*plainData*/, uint8_t* /*defines*/, uint64_t /*numValues*/, parquet_filter_t& /*filter*/, uint64_t /*resultOffset*/, common::ValueVector* /*result*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } virtual void resetPage() {} virtual uint64_t getGroupRowsAvailable() { return groupRowsAvailable; } diff --git a/src/include/processor/operator/persistent/reader/parquet/parquet_dbp_decoder.h b/src/include/processor/operator/persistent/reader/parquet/parquet_dbp_decoder.h index 3d1760ba30..4a3d9bf288 100644 --- a/src/include/processor/operator/persistent/reader/parquet/parquet_dbp_decoder.h +++ b/src/include/processor/operator/persistent/reader/parquet/parquet_dbp_decoder.h @@ -17,7 +17,7 @@ class DbpDecoder { ParquetDecodeUtils::ZigzagToInt(ParquetDecodeUtils::VarintDecode(buffer_)); // some derivatives - KU_ASSERT(miniblocks_per_block > 0); + RYU_ASSERT(miniblocks_per_block > 0); values_per_miniblock = block_value_count / miniblocks_per_block; miniblock_bit_widths = std::unique_ptr(new uint8_t[miniblocks_per_block]); diff --git a/src/include/processor/operator/persistent/reader/parquet/parquet_reader.h b/src/include/processor/operator/persistent/reader/parquet/parquet_reader.h index 5ae6dfdf09..425161ba29 100644 --- a/src/include/processor/operator/persistent/reader/parquet/parquet_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/parquet_reader.h @@ -64,9 +64,9 @@ class ParquetReader { std::make_shared(fileInfo_, prefetch_mode)); } const ryu_parquet::format::RowGroup& getGroup(ParquetReaderScanState& state) { - KU_ASSERT( + RYU_ASSERT( state.currentGroup >= 0 && (uint64_t)state.currentGroup < state.groupIdxList.size()); - KU_ASSERT(state.groupIdxList[state.currentGroup] < metadata->row_groups.size()); + RYU_ASSERT(state.groupIdxList[state.currentGroup] < metadata->row_groups.size()); return metadata->row_groups[state.groupIdxList[state.currentGroup]]; } static common::LogicalType deriveLogicalType(const ryu_parquet::format::SchemaElement& s_ele); diff --git a/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h index 1aafc9bed0..841a30b823 100644 --- a/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h @@ -9,7 +9,7 @@ namespace processor { template struct TemplatedParquetValueConversion { static VALUE_TYPE dictRead(ByteBuffer& dict, uint32_t& offset, ColumnReader& /*reader*/) { - KU_ASSERT(offset < dict.len / sizeof(VALUE_TYPE)); + RYU_ASSERT(offset < dict.len / sizeof(VALUE_TYPE)); return ((VALUE_TYPE*)dict.ptr)[offset]; } diff --git a/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h b/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h index d8826a3ced..24e053a927 100644 --- a/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h +++ b/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h @@ -126,7 +126,7 @@ class ThriftFileTransport auto prefetch_buffer = ra_buffer.GetReadHead(location); if (prefetch_buffer != nullptr && location - prefetch_buffer->location + len <= prefetch_buffer->size) { - KU_ASSERT(location - prefetch_buffer->location + len <= prefetch_buffer->size); + RYU_ASSERT(location - prefetch_buffer->location + len <= prefetch_buffer->size); if (!prefetch_buffer->data_isset) { prefetch_buffer->Allocate(); @@ -140,7 +140,7 @@ class ThriftFileTransport Prefetch(location, std::min(PREFETCH_FALLBACK_BUFFERSIZE, handle->getFileSize() - location)); auto prefetch_buffer_fallback = ra_buffer.GetReadHead(location); - KU_ASSERT(location - prefetch_buffer_fallback->location + len <= + RYU_ASSERT(location - prefetch_buffer_fallback->location + len <= prefetch_buffer_fallback->size); memcpy(buf, prefetch_buffer_fallback->data.get() + location - diff --git a/src/include/processor/operator/persistent/writer/parquet/basic_column_writer.h b/src/include/processor/operator/persistent/writer/parquet/basic_column_writer.h index 2b9624aad6..c8f64c5275 100644 --- a/src/include/processor/operator/persistent/writer/parquet/basic_column_writer.h +++ b/src/include/processor/operator/persistent/writer/parquet/basic_column_writer.h @@ -67,7 +67,7 @@ class BasicColumnWriter : public ColumnWriter { // Retrieves the row size of a vector at the specified location. Only used for scalar types. virtual uint64_t getRowSize(common::ValueVector* /*vector*/, uint64_t /*index*/, BasicColumnWriterState& /*state*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } // Writes a (subset of a) vector to the specified serializer. Only used for scalar types. virtual void writeVector(common::Serializer& bufferedSerializer, ColumnWriterStatistics* stats, @@ -76,12 +76,12 @@ class BasicColumnWriter : public ColumnWriter { virtual bool hasDictionary(BasicColumnWriterState& /*writerState*/) { return false; } // The number of elements in the dictionary. - virtual uint64_t dictionarySize(BasicColumnWriterState& /*writerState*/) { KU_UNREACHABLE; } + virtual uint64_t dictionarySize(BasicColumnWriterState& /*writerState*/) { RYU_UNREACHABLE; } void writeDictionary(BasicColumnWriterState& state, std::unique_ptr bufferedSerializer, uint64_t rowCount); virtual void flushDictionary(BasicColumnWriterState& /*state*/, ColumnWriterStatistics* /*stats*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } void setParquetStatistics(BasicColumnWriterState& state, diff --git a/src/include/processor/operator/persistent/writer/parquet/column_writer.h b/src/include/processor/operator/persistent/writer/parquet/column_writer.h index 236a44582b..bba1ed77b0 100644 --- a/src/include/processor/operator/persistent/writer/parquet/column_writer.h +++ b/src/include/processor/operator/persistent/writer/parquet/column_writer.h @@ -75,10 +75,10 @@ class ColumnWriter { virtual bool hasAnalyze() { return false; } virtual void analyze(ColumnWriterState& /*state*/, ColumnWriterState* /*parent*/, common::ValueVector* /*vector*/, uint64_t /*count*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } // Called after all data has been passed to Analyze. - virtual void finalizeAnalyze(ColumnWriterState& /*state*/) { KU_UNREACHABLE; } + virtual void finalizeAnalyze(ColumnWriterState& /*state*/) { RYU_UNREACHABLE; } virtual void prepare(ColumnWriterState& state, ColumnWriterState* parent, common::ValueVector* vector, uint64_t count) = 0; virtual void beginWrite(ColumnWriterState& state) = 0; diff --git a/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h b/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h index d081ae47c2..c4722d57b0 100644 --- a/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h +++ b/src/include/processor/operator/persistent/writer/parquet/string_column_writer.h @@ -62,7 +62,7 @@ class StringWriterPageState : public ColumnWriterPageState { public: explicit StringWriterPageState(uint32_t bitWidth, const string_map_t& values) : bitWidth(bitWidth), dictionary(values), encoder(bitWidth), writtenValue(false) { - KU_ASSERT(isDictionaryEncoded() || (bitWidth == 0 && dictionary.empty())); + RYU_ASSERT(isDictionaryEncoded() || (bitWidth == 0 && dictionary.empty())); } inline bool isDictionaryEncoded() const { return bitWidth != 0; } @@ -112,7 +112,7 @@ class StringColumnWriter : public BasicColumnWriter { inline uint64_t dictionarySize(BasicColumnWriterState& writerState) override { auto& state = reinterpret_cast(writerState); - KU_ASSERT(state.isDictionaryEncoded()); + RYU_ASSERT(state.isDictionaryEncoded()); return state.dictionary.size(); } diff --git a/src/include/processor/operator/scan/scan_node_table.h b/src/include/processor/operator/scan/scan_node_table.h index 9bdc23bece..c85d1d880c 100644 --- a/src/include/processor/operator/scan/scan_node_table.h +++ b/src/include/processor/operator/scan/scan_node_table.h @@ -86,7 +86,7 @@ class ScanNodeTable final : public ScanTable { scanState{nullptr}, tableInfos{std::move(tableInfos)}, sharedStates{std::move(sharedStates)}, progressSharedState{std::move(progressSharedState)} { - KU_ASSERT(this->tableInfos.size() == this->sharedStates.size()); + RYU_ASSERT(this->tableInfos.size() == this->sharedStates.size()); } common::table_id_map_t getSemiMasks() const; @@ -98,7 +98,7 @@ class ScanNodeTable final : public ScanTable { bool getNextTuplesInternal(ExecutionContext* context) override; const ScanNodeTableSharedState& getSharedState(common::idx_t idx) const { - KU_ASSERT(idx < sharedStates.size()); + RYU_ASSERT(idx < sharedStates.size()); return *sharedStates[idx]; } diff --git a/src/include/processor/operator/semi_masker.h b/src/include/processor/operator/semi_masker.h index 1a5293331d..0c32c147ad 100644 --- a/src/include/processor/operator/semi_masker.h +++ b/src/include/processor/operator/semi_masker.h @@ -17,7 +17,7 @@ struct SemiMaskerLocalState { void maskSingleTable(common::offset_t offset) const { singleTableRef->mask(offset); } void maskMultiTable(common::nodeID_t nodeID) const { - KU_ASSERT(localMasksPerTable.contains(nodeID.tableID)); + RYU_ASSERT(localMasksPerTable.contains(nodeID.tableID)); localMasksPerTable.at(nodeID.tableID)->mask(nodeID.offset); } }; diff --git a/src/include/processor/operator/sink.h b/src/include/processor/operator/sink.h index 1ae7750f27..c0f78ad717 100644 --- a/src/include/processor/operator/sink.h +++ b/src/include/processor/operator/sink.h @@ -24,7 +24,7 @@ class RYU_API Sink : public PhysicalOperator { bool isSink() const override { return true; } void setDescriptor(std::unique_ptr descriptor) { - KU_ASSERT(resultSetDescriptor == nullptr); + RYU_ASSERT(resultSetDescriptor == nullptr); resultSetDescriptor = std::move(descriptor); } std::unique_ptr getResultSet(storage::MemoryManager* memoryManager); diff --git a/src/include/processor/plan_mapper.h b/src/include/processor/plan_mapper.h index 33e5a8f840..182eca2d02 100644 --- a/src/include/processor/plan_mapper.h +++ b/src/include/processor/plan_mapper.h @@ -236,11 +236,11 @@ class PlanMapper { void addOperatorMapping(const planner::LogicalOperator* logicalOp, PhysicalOperator* physicalOp) { - KU_ASSERT(!logicalOpToPhysicalOpMap.contains(logicalOp)); + RYU_ASSERT(!logicalOpToPhysicalOpMap.contains(logicalOp)); logicalOpToPhysicalOpMap.insert({logicalOp, physicalOp}); } void eraseOperatorMapping(const planner::LogicalOperator* logicalOp) { - KU_ASSERT(logicalOpToPhysicalOpMap.contains(logicalOp)); + RYU_ASSERT(logicalOpToPhysicalOpMap.contains(logicalOp)); logicalOpToPhysicalOpMap.erase(logicalOp); } diff --git a/src/include/processor/result/factorized_table_schema.h b/src/include/processor/result/factorized_table_schema.h index b5590ca3b6..d7e5c547b0 100644 --- a/src/include/processor/result/factorized_table_schema.h +++ b/src/include/processor/result/factorized_table_schema.h @@ -70,7 +70,7 @@ class RYU_API FactorizedTableSchema { ft_col_offset_t getColOffset(ft_col_idx_t idx) const { return colOffsets[idx]; } void setMayContainsNullsToTrue(ft_col_idx_t idx) { - KU_ASSERT(idx < columns.size()); + RYU_ASSERT(idx < columns.size()); columns[idx].setMayContainsNullsToTrue(); } diff --git a/src/include/processor/result/result_set.h b/src/include/processor/result/result_set.h index 0288979205..046b7bdefd 100644 --- a/src/include/processor/result/result_set.h +++ b/src/include/processor/result/result_set.h @@ -16,7 +16,7 @@ class ResultSet { ResultSet(ResultSetDescriptor* resultSetDescriptor, storage::MemoryManager* memoryManager); void insert(common::idx_t pos, std::shared_ptr dataChunk) { - KU_ASSERT(dataChunks.size() > pos); + RYU_ASSERT(dataChunks.size() > pos); dataChunks[pos] = std::move(dataChunk); } diff --git a/src/include/storage/buffer_manager/memory_manager.h b/src/include/storage/buffer_manager/memory_manager.h index 82bcc883a3..3b334e0e35 100644 --- a/src/include/storage/buffer_manager/memory_manager.h +++ b/src/include/storage/buffer_manager/memory_manager.h @@ -35,7 +35,7 @@ class MemoryBuffer { DELETE_COPY_AND_MOVE(MemoryBuffer); std::span getBuffer() const { - KU_ASSERT(!evicted); + RYU_ASSERT(!evicted); return buffer; } uint8_t* getData() const { return getBuffer().data(); } diff --git a/src/include/storage/buffer_manager/mm_allocator.h b/src/include/storage/buffer_manager/mm_allocator.h index f2f75d5a67..381551ba71 100644 --- a/src/include/storage/buffer_manager/mm_allocator.h +++ b/src/include/storage/buffer_manager/mm_allocator.h @@ -17,23 +17,23 @@ class MmAllocator { DELETE_BOTH_MOVE(MmAllocator); [[nodiscard]] T* allocate(const std::size_t size) { - KU_ASSERT_UNCONDITIONAL(mm != nullptr); - KU_ASSERT_UNCONDITIONAL(size > 0); - KU_ASSERT_UNCONDITIONAL(size <= std::numeric_limits::max() / sizeof(T)); + RYU_ASSERT_UNCONDITIONAL(mm != nullptr); + RYU_ASSERT_UNCONDITIONAL(size > 0); + RYU_ASSERT_UNCONDITIONAL(size <= std::numeric_limits::max() / sizeof(T)); auto buffer = mm->mallocBuffer(false, size * sizeof(T)); auto p = reinterpret_cast(buffer.data()); // Ensure proper alignment - KU_ASSERT_UNCONDITIONAL(reinterpret_cast(p) % alignof(T) == 0); + RYU_ASSERT_UNCONDITIONAL(reinterpret_cast(p) % alignof(T) == 0); return p; } void deallocate(T* p, const std::size_t size) noexcept { - KU_ASSERT_UNCONDITIONAL(mm != nullptr); - KU_ASSERT_UNCONDITIONAL(p != nullptr); - KU_ASSERT_UNCONDITIONAL(size > 0); + RYU_ASSERT_UNCONDITIONAL(mm != nullptr); + RYU_ASSERT_UNCONDITIONAL(p != nullptr); + RYU_ASSERT_UNCONDITIONAL(size > 0); const auto buffer = std::span(reinterpret_cast(p), size * sizeof(T)); if (buffer.data() != nullptr) { diff --git a/src/include/storage/buffer_manager/page_state.h b/src/include/storage/buffer_manager/page_state.h index a92848820f..36edc986e7 100644 --- a/src/include/storage/buffer_manager/page_state.h +++ b/src/include/storage/buffer_manager/page_state.h @@ -52,17 +52,17 @@ class PageState { } void unlock() { // TODO(Keenan / Guodong): Track down this rare bug and re-enable the assert. Ref #2289. - // KU_ASSERT(getState(stateAndVersion.load()) == LOCKED); + // RYU_ASSERT(getState(stateAndVersion.load()) == LOCKED); stateAndVersion.store(updateStateAndIncrementVersion(stateAndVersion.load(), UNLOCKED)); } void unlockUnchanged() { // TODO(Keenan / Guodong): Track down this rare bug and re-enable the assert. Ref #2289. - // KU_ASSERT(getState(stateAndVersion.load()) == LOCKED); + // RYU_ASSERT(getState(stateAndVersion.load()) == LOCKED); stateAndVersion.store(updateStateWithSameVersion(stateAndVersion.load(), UNLOCKED)); } // Change page state from Mark to Unlocked. bool tryClearMark(uint64_t oldStateAndVersion) { - KU_ASSERT(getState(oldStateAndVersion) == MARKED); + RYU_ASSERT(getState(oldStateAndVersion) == MARKED); return stateAndVersion.compare_exchange_strong(oldStateAndVersion, updateStateWithSameVersion(oldStateAndVersion, UNLOCKED)); } @@ -72,11 +72,11 @@ class PageState { } void setDirty() { - KU_ASSERT(getState(stateAndVersion.load()) == LOCKED); + RYU_ASSERT(getState(stateAndVersion.load()) == LOCKED); stateAndVersion |= DIRTY_MASK; } void clearDirty() { - KU_ASSERT(getState(stateAndVersion.load()) == LOCKED); + RYU_ASSERT(getState(stateAndVersion.load()) == LOCKED); stateAndVersion &= ~DIRTY_MASK; } // Meant to be used when flushing in a single thread. diff --git a/src/include/storage/compression/compression.h b/src/include/storage/compression/compression.h index 5447ea1510..402415e14c 100644 --- a/src/include/storage/compression/compression.h +++ b/src/include/storage/compression/compression.h @@ -81,7 +81,7 @@ union StorageValue { } else if constexpr (std::is_floating_point()) { return floatVal; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -180,11 +180,11 @@ struct RYU_API CompressionMetadata { // accessors for additionalMetadata inline const ExtraMetadata* getExtraMetadata() const { - KU_ASSERT(extraMetadata.has_value()); + RYU_ASSERT(extraMetadata.has_value()); return extraMetadata.value().get(); } inline ExtraMetadata* getExtraMetadata() { - KU_ASSERT(extraMetadata.has_value()); + RYU_ASSERT(extraMetadata.has_value()); return extraMetadata.value().get(); } inline const ALPMetadata* floatMetadata() const { @@ -320,7 +320,7 @@ class Uncompressed : public CompressionAlg { } uint64_t numValues = std::min(numValuesRemaining, dstBufferSize / numBytesPerValue); uint64_t sizeToCopy = numValues * numBytesPerValue; - KU_ASSERT(sizeToCopy <= dstBufferSize); + RYU_ASSERT(sizeToCopy <= dstBufferSize); std::memcpy(dstBuffer, srcBuffer, sizeToCopy); srcBuffer += sizeToCopy; return sizeToCopy; diff --git a/src/include/storage/compression/sign_extend.h b/src/include/storage/compression/sign_extend.h index 50170b4ccb..b2ed3cae44 100644 --- a/src/include/storage/compression/sign_extend.h +++ b/src/include/storage/compression/sign_extend.h @@ -41,7 +41,7 @@ T Load(const uint8_t* ptr) { // Sign bit extension template, uint64_t CHUNK_SIZE> static void SignExtend(uint8_t* dst, uint8_t width) { - KU_ASSERT(width < sizeof(T) * 8); + RYU_ASSERT(width < sizeof(T) * 8); T const mask = T_U(1) << (width - 1); for (uint64_t i = 0; i < CHUNK_SIZE; ++i) { T value = Load(dst + i * sizeof(T)); diff --git a/src/include/storage/disk_array.h b/src/include/storage/disk_array.h index 65dee5bcee..56ffb9868c 100644 --- a/src/include/storage/disk_array.h +++ b/src/include/storage/disk_array.h @@ -175,8 +175,8 @@ class DiskArrayInternal { ~WriteIterator() { unpin(); } std::span operator*() const { - KU_ASSERT(idx < diskArray.headerForWriteTrx.numElements); - KU_ASSERT(shadowPageAndFrame.originalPage != common::INVALID_PAGE_IDX); + RYU_ASSERT(idx < diskArray.headerForWriteTrx.numElements); + RYU_ASSERT(shadowPageAndFrame.originalPage != common::INVALID_PAGE_IDX); return std::span(shadowPageAndFrame.frame + apCursor.elemPosInPage, valueSize); } @@ -392,7 +392,7 @@ class BlockVector { // NOLINTNEXTLINE(readability-non-const-parameter) placement-new requires non-const ptr static constexpr auto defaultConstructor = [](uint8_t* data) { [[maybe_unused]] auto* p = new (data) U(); - KU_ASSERT(p); + RYU_ASSERT(p); }; vector.resize(newNumElements, defaultConstructor); } diff --git a/src/include/storage/disk_array_collection.h b/src/include/storage/disk_array_collection.h index 37e9e522e2..c6357b0646 100644 --- a/src/include/storage/disk_array_collection.h +++ b/src/include/storage/disk_array_collection.h @@ -51,7 +51,7 @@ class DiskArrayCollection { template std::unique_ptr> getDiskArray(uint32_t idx) { - KU_ASSERT(idx < numHeaders); + RYU_ASSERT(idx < numHeaders); auto& readHeader = headersForReadTrx[idx / HeaderPage::NUM_HEADERS_PER_PAGE] ->headers[idx % HeaderPage::NUM_HEADERS_PER_PAGE]; auto& writeHeader = headersForWriteTrx[idx / HeaderPage::NUM_HEADERS_PER_PAGE] diff --git a/src/include/storage/enums/residency_state.h b/src/include/storage/enums/residency_state.h index 09fd61f590..c72b093256 100644 --- a/src/include/storage/enums/residency_state.h +++ b/src/include/storage/enums/residency_state.h @@ -20,7 +20,7 @@ struct ResidencyStateUtils { return "ON_DISK"; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/include/storage/file_handle.h b/src/include/storage/file_handle.h index 0b6bd0f0db..dbba1db1cc 100644 --- a/src/include/storage/file_handle.h +++ b/src/include/storage/file_handle.h @@ -70,7 +70,7 @@ class FileHandle { // This function assumes the page is already LOCKED. void setLockedPageDirty(common::page_idx_t pageIdx) { - KU_ASSERT(pageIdx < numPages); + RYU_ASSERT(pageIdx < numPages); pageStates[pageIdx].setDirty(); } @@ -88,12 +88,12 @@ class FileHandle { void flushAllDirtyPagesInFrames(); void readPageFromDisk(uint8_t* frame, common::page_idx_t pageIdx) const { - KU_ASSERT(!isInMemoryMode()); - KU_ASSERT(pageIdx < numPages); + RYU_ASSERT(!isInMemoryMode()); + RYU_ASSERT(pageIdx < numPages); fileInfo->readFromFile(frame, getPageSize(), pageIdx * getPageSize()); } void writePageToFile(const uint8_t* buffer, common::page_idx_t pageIdx) { - KU_ASSERT(pageIdx < numPages); + RYU_ASSERT(pageIdx < numPages); writePagesToFile(buffer, getPageSize(), pageIdx); } void writePagesToFile(const uint8_t* buffer, uint64_t size, common::page_idx_t startPageIdx); @@ -122,7 +122,7 @@ class FileHandle { main::ClientContext* context); void constructTmpFileHandle(const std::string& path); common::frame_idx_t getFrameIdx(common::page_idx_t pageIdx) { - KU_ASSERT(pageIdx < pageCapacity); + RYU_ASSERT(pageIdx < pageCapacity); return (frameGroupIdxes[pageIdx >> common::StorageConstants::PAGE_GROUP_SIZE_LOG2] << common::StorageConstants::PAGE_GROUP_SIZE_LOG2) | (pageIdx & common::StorageConstants::PAGE_IDX_IN_GROUP_MASK); diff --git a/src/include/storage/index/hash_index.h b/src/include/storage/index/hash_index.h index 12ccfd7f6c..6d3da5ee5a 100644 --- a/src/include/storage/index/hash_index.h +++ b/src/include/storage/index/hash_index.h @@ -107,7 +107,7 @@ class HashIndex final : public OnDiskHashIndex { if (localLookupState == HashIndexLocalLookupState::KEY_FOUND) { return true; } - KU_ASSERT(localLookupState == HashIndexLocalLookupState::KEY_NOT_EXIST); + RYU_ASSERT(localLookupState == HashIndexLocalLookupState::KEY_NOT_EXIST); return lookupInPersistentIndex(transaction, key, result, isVisible); } @@ -283,7 +283,7 @@ class HashIndex final : public OnDiskHashIndex { } bool nextChainedSlot(const transaction::Transaction* transaction, SlotIterator& iter) const { - KU_ASSERT(iter.slotInfo.slotType == SlotType::PRIMARY || + RYU_ASSERT(iter.slotInfo.slotType == SlotType::PRIMARY || iter.slotInfo.slotId != iter.slot.header.nextOvfSlotId); if (iter.slot.header.nextOvfSlotId != SlotHeader::INVALID_OVERFLOW_SLOT_ID) { iter.slotInfo.slotId = iter.slot.header.nextOvfSlotId; @@ -382,7 +382,7 @@ class PrimaryKeyIndex final : public Index { template inline bool lookup(const transaction::Transaction* trx, T key, common::offset_t& result, visible_func isVisible) { - KU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); + RYU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); return getTypedHashIndex(key)->lookupInternal(trx, key, result, isVisible); } @@ -406,7 +406,7 @@ class PrimaryKeyIndex final : public Index { template inline bool insert(const transaction::Transaction* transaction, T key, common::offset_t value, visible_func isVisible) { - KU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); + RYU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); return getTypedHashIndex(key)->insertInternal(transaction, std::move(key), value, isVisible); } @@ -424,8 +424,8 @@ class PrimaryKeyIndex final : public Index { template size_t appendWithIndexPosNoLock(const transaction::Transaction* transaction, IndexBuffer& buffer, uint64_t bufferOffset, uint64_t indexPos, visible_func isVisible) { - KU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); - KU_ASSERT(std::all_of(buffer.begin(), buffer.end(), [&](auto& elem) { + RYU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); + RYU_ASSERT(std::all_of(buffer.begin(), buffer.end(), [&](auto& elem) { return HashIndexUtils::getHashIndexPosition(elem.first) == indexPos; })); return getTypedHashIndexByPos>(indexPos)->appendNoLock(transaction, buffer, @@ -450,14 +450,14 @@ class PrimaryKeyIndex final : public Index { } template inline void delete_(T key) { - KU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); + RYU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); return getTypedHashIndex(key)->deleteInternal(key); } bool discardLocal(common::ku_string_t key) { return discardLocal(key.getAsStringView()); } template inline bool discardLocal(T key) { - KU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); + RYU_ASSERT(indexInfo.keyDataTypes[0] == common::TypeUtils::getPhysicalTypeIDForType()); return getTypedHashIndex(key)->discardLocal(key); } @@ -470,7 +470,7 @@ class PrimaryKeyIndex final : public Index { void rollbackCheckpoint() override; common::PhysicalTypeID keyTypeID() const { - KU_ASSERT(indexInfo.keyDataTypes.size() == 1); + RYU_ASSERT(indexInfo.keyDataTypes.size() == 1); return indexInfo.keyDataTypes[0]; } void reclaimStorage(PageAllocator& pageAllocator) const; diff --git a/src/include/storage/index/hash_index_slot.h b/src/include/storage/index/hash_index_slot.h index bb9772f261..ebf0b37fd2 100644 --- a/src/include/storage/index/hash_index_slot.h +++ b/src/include/storage/index/hash_index_slot.h @@ -61,7 +61,7 @@ struct SlotEntry { auto padding = sizeof(SlotEntry) - sizeof(T) - sizeof(common::offset_t); memset(reinterpret_cast(&key) + sizeof(T), 0, padding); // Assumes that all the padding follows the key - KU_ASSERT((std::byte*)&key + sizeof(key) + padding == (std::byte*)&value); + RYU_ASSERT((std::byte*)&key + sizeof(key) + padding == (std::byte*)&value); } } SlotEntry() : SlotEntry(T{}, 0) {} diff --git a/src/include/storage/index/in_mem_hash_index.h b/src/include/storage/index/in_mem_hash_index.h index 989f3e68d9..fe99482737 100644 --- a/src/include/storage/index/in_mem_hash_index.h +++ b/src/include/storage/index/in_mem_hash_index.h @@ -146,7 +146,7 @@ class InMemHashIndex final { // Leaves the slot pointer pointing at the last slot to make it easier to add a new one bool nextChainedSlot(SlotIterator& iter) const { - KU_ASSERT(iter.slotInfo.slotType == SlotType::PRIMARY || + RYU_ASSERT(iter.slotInfo.slotType == SlotType::PRIMARY || iter.slotInfo.slotId != iter.slot->header.nextOvfSlotId); if (iter.slot->header.nextOvfSlotId != SlotHeader::INVALID_OVERFLOW_SLOT_ID) { iter.slotInfo.slotId = iter.slot->header.nextOvfSlotId; @@ -193,7 +193,7 @@ class InMemHashIndex final { while (nextChainedSlot(newIter)) {} if (newIter.slotInfo != iter.slotInfo || *deletedPos != newIter.slot->header.numEntries() - 1) { - KU_ASSERT(newIter.slot->header.numEntries() > 0); + RYU_ASSERT(newIter.slot->header.numEntries() > 0); auto lastEntryPos = newIter.slot->header.numEntries() - 1; iter.slot->entries[*deletedPos] = newIter.slot->entries[lastEntryPos]; iter.slot->header.setEntryValid(*deletedPos, @@ -261,7 +261,7 @@ class InMemHashIndex final { void insert(OwnedType&& key, InMemSlotType* slot, uint8_t entryPos, common::offset_t value, uint8_t fingerprint) { - KU_ASSERT(HashIndexUtils::getFingerprintForHash(HashIndexUtils::hash(key)) == fingerprint); + RYU_ASSERT(HashIndexUtils::getFingerprintForHash(HashIndexUtils::hash(key)) == fingerprint); auto& entry = slot->entries[entryPos]; entry = SlotEntry(std::move(key), value); slot->header.setEntryValid(entryPos, fingerprint); @@ -285,7 +285,7 @@ class InMemHashIndex final { visible_func isVisible) { do { auto numEntries = iter.slot->header.numEntries(); - KU_ASSERT(numEntries == std::countr_one(iter.slot->header.validityMask)); + RYU_ASSERT(numEntries == std::countr_one(iter.slot->header.validityMask)); for (auto entryPos = 0u; entryPos < numEntries; entryPos++) { if (iter.slot->header.fingerprints[entryPos] == fingerprint && equals(key, iter.slot->entries[entryPos].key) && diff --git a/src/include/storage/index/index.h b/src/include/storage/index/index.h index 8ce6da1c5a..702c5fc887 100644 --- a/src/include/storage/index/index.h +++ b/src/include/storage/index/index.h @@ -134,12 +134,12 @@ class RYU_API Index { } virtual std::unique_ptr initUpdateState(main::ClientContext* /*context*/, common::column_id_t /*columnID*/, visible_func /*isVisible*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } virtual void update(transaction::Transaction* /*transaction*/, const common::ValueVector& /*nodeIDVector*/, common::ValueVector& /*propertyVector*/, UpdateState& /*updateState*/) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } virtual std::unique_ptr initDeleteState( const transaction::Transaction* transaction, MemoryManager* mm, visible_func isVisible) = 0; @@ -165,7 +165,7 @@ class RYU_API Index { } std::span getStorageBuffer() const { - KU_ASSERT(!loaded); + RYU_ASSERT(!loaded); return std::span(storageInfoBuffer.get(), storageInfoBufferSize); } const IndexStorageInfo& getStorageInfo() const { return *storageInfo; } @@ -201,27 +201,27 @@ class IndexHolder { // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const. void checkpoint(main::ClientContext* context, PageAllocator& pageAllocator) { if (loaded) { - KU_ASSERT(index); + RYU_ASSERT(index); index->checkpoint(context, pageAllocator); } } // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const. void rollbackCheckpoint() { if (loaded) { - KU_ASSERT(index); + RYU_ASSERT(index); index->rollbackCheckpoint(); } } // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const. void finalize(main::ClientContext* context) { if (loaded) { - KU_ASSERT(index); + RYU_ASSERT(index); index->finalize(context); } } Index* getIndex() const { - KU_ASSERT(index); + RYU_ASSERT(index); return index.get(); } diff --git a/src/include/storage/local_storage/local_hash_index.h b/src/include/storage/local_storage/local_hash_index.h index 7d3921b01a..59c0cdcbc1 100644 --- a/src/include/storage/local_storage/local_hash_index.h +++ b/src/include/storage/local_storage/local_hash_index.h @@ -148,7 +148,7 @@ class LocalHashIndex { [&](T) { localIndex = std::make_unique>(memoryManager, nullptr); }, - [&](auto) { KU_UNREACHABLE; }); + [&](auto) { RYU_UNREACHABLE; }); } common::offset_t lookup(const common::ValueVector& keyVector, common::sel_t pos, @@ -158,12 +158,12 @@ class LocalHashIndex { keyDataTypeID, [&]( T) { result = lookup(keyVector.getValue(pos), isVisible); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return result; } common::offset_t lookup(const common::ValueVector& keyVector, visible_func isVisible) { - KU_ASSERT(keyVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(keyVector.state->getSelVector().getSelSize() == 1); auto pos = keyVector.state->getSelVector().getSelectedPositions()[0]; return lookup(keyVector, pos, isVisible); } @@ -191,7 +191,7 @@ class LocalHashIndex { insert(keyVector.getValue(pos), startNodeOffset + i, isVisible); } }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return numInserted == keyVector.state->getSelVector().getSelSize(); } @@ -200,7 +200,7 @@ class LocalHashIndex { } template bool insert(T key, common::offset_t value, visible_func isVisible) { - KU_ASSERT(keyDataTypeID == common::TypeUtils::getPhysicalTypeIDForType()); + RYU_ASSERT(keyDataTypeID == common::TypeUtils::getPhysicalTypeIDForType()); return common::ku_dynamic_cast>*>(localIndex.get()) ->insert(std::move(key), value, isVisible); } @@ -214,13 +214,13 @@ class LocalHashIndex { delete_(keyVector.getValue(pos)); } }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } void delete_(const common::ku_string_t key) { delete_(key.getAsStringView()); } template void delete_(T key) { - KU_ASSERT(keyDataTypeID == common::TypeUtils::getPhysicalTypeIDForType()); + RYU_ASSERT(keyDataTypeID == common::TypeUtils::getPhysicalTypeIDForType()); common::ku_dynamic_cast>*>(localIndex.get()) ->deleteKey(key); } diff --git a/src/include/storage/local_storage/local_rel_table.h b/src/include/storage/local_storage/local_rel_table.h index d84281cdcb..0a14345158 100644 --- a/src/include/storage/local_storage/local_rel_table.h +++ b/src/include/storage/local_storage/local_rel_table.h @@ -56,10 +56,10 @@ class LocalRelTable final : public LocalTable { } } bool isEmpty() const { - KU_ASSERT(directedIndices.size() >= 1); + RYU_ASSERT(directedIndices.size() >= 1); RUNTIME_CHECK(for (const auto& index : directedIndices) { - KU_ASSERT(index.index.empty() == directedIndices[0].index.empty()); + RYU_ASSERT(index.index.empty() == directedIndices[0].index.empty()); }); return directedIndices[0].isEmpty(); } @@ -69,7 +69,7 @@ class LocalRelTable final : public LocalTable { DirectedCSRIndex::index_t& getCSRIndex(common::RelDataDirection direction) { const auto directionIdx = common::RelDirectionUtils::relDirectionToKeyIdx(direction); - KU_ASSERT(directionIdx < directedIndices.size()); + RYU_ASSERT(directionIdx < directedIndices.size()); return directedIndices[directionIdx].index; } NodeGroup& getLocalNodeGroup() const { return *localNodeGroup; } diff --git a/src/include/storage/overflow_file.h b/src/include/storage/overflow_file.h index 88f8a69d79..1ad4141112 100644 --- a/src/include/storage/overflow_file.h +++ b/src/include/storage/overflow_file.h @@ -111,14 +111,14 @@ class OverflowFile { common::page_idx_t getHeaderPageIdx() const { return headerPageIdx; } OverflowFileHandle* addHandle() { - KU_ASSERT(handles.size() < NUM_HASH_INDEXES); + RYU_ASSERT(handles.size() < NUM_HASH_INDEXES); handles.emplace_back( std::make_unique(*this, header.entries[handles.size()])); return handles.back().get(); } FileHandle* getFileHandle() const { - KU_ASSERT(fileHandle); + RYU_ASSERT(fileHandle); return fileHandle; } diff --git a/src/include/storage/page_range.h b/src/include/storage/page_range.h index 2f26c376c1..bbdf62dce7 100644 --- a/src/include/storage/page_range.h +++ b/src/include/storage/page_range.h @@ -10,7 +10,7 @@ struct PageRange { : startPageIdx(startPageIdx), numPages(numPages) {} PageRange subrange(common::page_idx_t newStartPage) const { - KU_ASSERT(newStartPage <= numPages); + RYU_ASSERT(newStartPage <= numPages); return {startPageIdx + newStartPage, numPages - newStartPage}; } diff --git a/src/include/storage/predicate/null_predicate.h b/src/include/storage/predicate/null_predicate.h index ec25fe7481..020096a9ca 100644 --- a/src/include/storage/predicate/null_predicate.h +++ b/src/include/storage/predicate/null_predicate.h @@ -10,7 +10,7 @@ class ColumnNullPredicate : public ColumnPredicate { public: explicit ColumnNullPredicate(std::string columnName, common::ExpressionType type) : ColumnPredicate{std::move(columnName), type} { - KU_ASSERT( + RYU_ASSERT( type == common::ExpressionType::IS_NULL || type == common::ExpressionType::IS_NOT_NULL); } diff --git a/src/include/storage/stats/column_stats.h b/src/include/storage/stats/column_stats.h index 169a7f64f0..70f23d3636 100644 --- a/src/include/storage/stats/column_stats.h +++ b/src/include/storage/stats/column_stats.h @@ -22,7 +22,7 @@ class ColumnStats { void merge(const ColumnStats& other) { if (hll) { - KU_ASSERT(other.hll); + RYU_ASSERT(other.hll); hll->merge(*other.hll); }; } diff --git a/src/include/storage/stats/table_stats.h b/src/include/storage/stats/table_stats.h index 125db6091e..191c71fdca 100644 --- a/src/include/storage/stats/table_stats.h +++ b/src/include/storage/stats/table_stats.h @@ -27,10 +27,10 @@ class TableStats { void merge(const std::vector& columnIDs, const TableStats& other) { cardinality += other.cardinality; - KU_ASSERT(columnIDs.size() == other.columnStats.size()); + RYU_ASSERT(columnIDs.size() == other.columnStats.size()); for (auto i = 0u; i < columnIDs.size(); ++i) { auto columnID = columnIDs[i]; - KU_ASSERT(columnID < columnStats.size()); + RYU_ASSERT(columnID < columnStats.size()); columnStats[columnID].merge(other.columnStats[i]); } } @@ -38,7 +38,7 @@ class TableStats { common::cardinality_t getTableCard() const { return cardinality; } common::cardinality_t getNumDistinctValues(common::column_id_t columnID) const { - KU_ASSERT(columnID < columnStats.size()); + RYU_ASSERT(columnID < columnStats.size()); return columnStats[columnID].getNumDistinctValues(); } diff --git a/src/include/storage/table/chunked_node_group.h b/src/include/storage/table/chunked_node_group.h index cf5ba0f2cb..b663acef06 100644 --- a/src/include/storage/table/chunked_node_group.h +++ b/src/include/storage/table/chunked_node_group.h @@ -64,12 +64,12 @@ class RYU_API InMemChunkedNodeGroup { void setNumRows(common::offset_t numRows_); ColumnChunkData& getColumnChunk(const common::column_id_t columnID) { - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); return *chunks[columnID]; } const ColumnChunkData& getColumnChunk(const common::column_id_t columnID) const { - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); return *chunks[columnID]; } @@ -96,7 +96,7 @@ class RYU_API InMemChunkedNodeGroup { } std::unique_ptr moveColumnChunk(const common::column_id_t columnID) { - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); return std::move(chunks[columnID]); } @@ -143,15 +143,15 @@ class ChunkedNodeGroup { common::row_idx_t getStartRowIdx() const { return startRowIdx; } common::row_idx_t getNumRows() const { return numRows; } const ColumnChunk& getColumnChunk(const common::column_id_t columnID) const { - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); return *chunks[columnID]; } ColumnChunk& getColumnChunk(const common::column_id_t columnID) { - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); return *chunks[columnID]; } std::unique_ptr moveColumnChunk(const common::column_id_t columnID) { - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); return std::move(chunks[columnID]); } bool isFullOrOnDisk() const { diff --git a/src/include/storage/table/column_chunk.h b/src/include/storage/table/column_chunk.h index 0faf5f5922..6b49cc09ed 100644 --- a/src/include/storage/table/column_chunk.h +++ b/src/include/storage/table/column_chunk.h @@ -75,7 +75,7 @@ common::offset_t genericRangeSegmentsFromIt(std::span segments, common::length_t length, Func func) { common::offset_t lengthScanned = 0; while (lengthScanned < length && segment != segments.end()) { - KU_ASSERT((**segment).getNumValues() > offsetInSegment); + RYU_ASSERT((**segment).getNumValues() > offsetInSegment); auto lengthInSegment = std::min(length - lengthScanned, (**segment).getNumValues() - offsetInSegment); func(*segment, offsetInSegment, lengthInSegment, lengthScanned); @@ -214,7 +214,7 @@ class ColumnChunk { ResidencyState getResidencyState() const { auto state = data.front()->getResidencyState(); - RUNTIME_CHECK(for (auto& chunk : data) { KU_ASSERT(chunk->getResidencyState() == state); }); + RUNTIME_CHECK(for (auto& chunk : data) { RYU_ASSERT(chunk->getResidencyState() == state); }); return state; } bool hasUpdates() const { return updateInfo.isSet(); } @@ -237,7 +237,7 @@ class ColumnChunk { void mapValues(Func func, uint64_t startOffset = 0, uint64_t endOffset = UINT64_MAX) { rangeSegments(startOffset, endOffset == UINT64_MAX ? UINT64_MAX : endOffset - startOffset, [&](auto& segment, auto offsetInSegment, auto lengthInSegment, auto dstOffset) { - KU_ASSERT(segment->getResidencyState() == ResidencyState::IN_MEMORY); + RYU_ASSERT(segment->getResidencyState() == ResidencyState::IN_MEMORY); auto* segmentData = segment->template getData(); for (size_t i = offsetInSegment; i < lengthInSegment; i++) { func(segmentData[i], dstOffset + i - offsetInSegment); @@ -247,38 +247,38 @@ class ColumnChunk { template T getValue(common::offset_t pos) const { - KU_ASSERT(pos < getCapacity()); + RYU_ASSERT(pos < getCapacity()); auto [segment, offsetInSegment] = genericFindSegment(std::span(data), pos); - KU_ASSERT(segment->get() != nullptr); - KU_ASSERT((*segment)->getResidencyState() == ResidencyState::IN_MEMORY); + RYU_ASSERT(segment->get() != nullptr); + RYU_ASSERT((*segment)->getResidencyState() == ResidencyState::IN_MEMORY); return (*segment)->template getValue(offsetInSegment); } template void setValue(T val, common::offset_t pos) const { - KU_ASSERT(pos < getCapacity()); + RYU_ASSERT(pos < getCapacity()); auto [segment, offsetInSegment] = genericFindSegment(std::span(data), pos); - KU_ASSERT(segment->get() != nullptr); - KU_ASSERT((*segment)->getResidencyState() == ResidencyState::IN_MEMORY); + RYU_ASSERT(segment->get() != nullptr); + RYU_ASSERT((*segment)->getResidencyState() == ResidencyState::IN_MEMORY); (*segment)->template setValue(val, pos); } void flush(PageAllocator& pageAllocator) { for (auto& segment : data) { - KU_ASSERT(segment->getResidencyState() == ResidencyState::IN_MEMORY); + RYU_ASSERT(segment->getResidencyState() == ResidencyState::IN_MEMORY); segment->flush(pageAllocator); } } void populateWithDefaultVal(evaluator::ExpressionEvaluator& defaultEvaluator, uint64_t& numValues_, ColumnStats* newColumnStats) { - KU_ASSERT(data.size() == 1 && data.back()->getNumValues() == 0); + RYU_ASSERT(data.size() == 1 && data.back()->getNumValues() == 0); data.back()->populateWithDefaultVal(defaultEvaluator, numValues_, newColumnStats); } void finalize() { for (auto& segment : data) { - KU_ASSERT(segment->getResidencyState() == ResidencyState::IN_MEMORY); + RYU_ASSERT(segment->getResidencyState() == ResidencyState::IN_MEMORY); segment->finalize(); } } diff --git a/src/include/storage/table/column_chunk_data.h b/src/include/storage/table/column_chunk_data.h index 648a894004..9c4e4850f7 100644 --- a/src/include/storage/table/column_chunk_data.h +++ b/src/include/storage/table/column_chunk_data.h @@ -64,25 +64,25 @@ struct SegmentState { } SegmentState& getChildState(common::idx_t childIdx) { - KU_ASSERT(childIdx < childrenStates.size()); + RYU_ASSERT(childIdx < childrenStates.size()); return childrenStates[childIdx]; } const SegmentState& getChildState(common::idx_t childIdx) const { - KU_ASSERT(childIdx < childrenStates.size()); + RYU_ASSERT(childIdx < childrenStates.size()); return childrenStates[childIdx]; } template InMemoryExceptionChunk* getExceptionChunk() { using GetType = std::unique_ptr>; - KU_ASSERT(std::holds_alternative(alpExceptionChunk)); + RYU_ASSERT(std::holds_alternative(alpExceptionChunk)); return std::get(alpExceptionChunk).get(); } template const InMemoryExceptionChunk* getExceptionChunkConst() const { using GetType = std::unique_ptr>; - KU_ASSERT(std::holds_alternative(alpExceptionChunk)); + RYU_ASSERT(std::holds_alternative(alpExceptionChunk)); return std::get(alpExceptionChunk).get(); } @@ -114,14 +114,14 @@ class RYU_API ColumnChunkData { template T getValue(common::offset_t pos) const { - KU_ASSERT(pos < numValues); - KU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(pos < numValues); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); return getData()[pos]; } template void setValue(T val, common::offset_t pos) { - KU_ASSERT(pos < capacity); - KU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(pos < capacity); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); getData()[pos] = val; if (pos >= numValues) { numValues = pos + 1; @@ -144,15 +144,15 @@ class RYU_API ColumnChunkData { ResidencyState getResidencyState() const { return residencyState; } bool isCompressionEnabled() const { return enableCompression; } ColumnChunkMetadata& getMetadata() { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); return metadata; } const ColumnChunkMetadata& getMetadata() const { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); return metadata; } void setMetadata(const ColumnChunkMetadata& metadata_) { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); metadata = metadata_; } @@ -210,7 +210,7 @@ class RYU_API ColumnChunkData { void populateWithDefaultVal(evaluator::ExpressionEvaluator& defaultEvaluator, uint64_t& numValues_, ColumnStats* newColumnStats); virtual void finalize() { - KU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); // DO NOTHING. } @@ -324,8 +324,8 @@ class RYU_API ColumnChunkData { template<> inline void ColumnChunkData::setValue(bool val, common::offset_t pos) { - KU_ASSERT(pos < capacity); - KU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(pos < capacity); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); // Buffer is rounded up to the nearest 8 bytes so that this cast is safe common::NullMask::setNull(getData(), pos, val); if (pos >= numValues) { @@ -407,7 +407,7 @@ class NullChunkData final : public BoolChunkData { void copyFromBuffer(const uint64_t* srcBuffer, uint64_t srcOffset, uint64_t dstOffset, uint64_t numBits) { - KU_ASSERT(numBits > 0); + RYU_ASSERT(numBits > 0); common::NullMask::copyNullMask(srcBuffer, srcOffset, getData(), dstOffset, numBits); auto [min, max] = common::NullMask::getMinMax(srcBuffer, srcOffset, numBits); diff --git a/src/include/storage/table/csr_chunked_node_group.h b/src/include/storage/table/csr_chunked_node_group.h index f2d0f64ebe..367bad1cb0 100644 --- a/src/include/storage/table/csr_chunked_node_group.h +++ b/src/include/storage/table/csr_chunked_node_group.h @@ -34,7 +34,7 @@ struct CSRRegion { [](bool hasUpdate) { return hasUpdate; }); } bool needCheckpointColumn(common::column_id_t columnID) const { - KU_ASSERT(columnID < hasUpdates.size()); + RYU_ASSERT(columnID < hasUpdates.size()); return hasInsertions || hasPersistentDeletions || hasUpdates[columnID]; } bool hasDeletionsOrInsertions() const { return hasInsertions || hasPersistentDeletions; } @@ -65,7 +65,7 @@ struct RYU_API InMemChunkedCSRHeader { InMemChunkedCSRHeader(std::unique_ptr offset, std::unique_ptr length) : offset{std::move(offset)}, length{std::move(length)} { - KU_ASSERT(this->offset && this->length); + RYU_ASSERT(this->offset && this->length); } common::offset_t getStartCSROffset(common::offset_t nodeOffset) const; @@ -107,7 +107,7 @@ struct ChunkedCSRHeader { randomLookup{other.randomLookup} {} ChunkedCSRHeader(std::unique_ptr offset, std::unique_ptr length) : offset{std::move(offset)}, length{std::move(length)} { - KU_ASSERT(this->offset && this->length); + RYU_ASSERT(this->offset && this->length); } common::offset_t getStartCSROffset(common::offset_t nodeOffset) const; diff --git a/src/include/storage/table/csr_node_group.h b/src/include/storage/table/csr_node_group.h index 2d8f07700c..7d29453484 100644 --- a/src/include/storage/table/csr_node_group.h +++ b/src/include/storage/table/csr_node_group.h @@ -70,8 +70,8 @@ struct NodeCSRIndex { } } void setInvalid(common::idx_t idx) { - KU_ASSERT(!isSequential); - KU_ASSERT(idx < rowIndices.size()); + RYU_ASSERT(!isSequential); + RYU_ASSERT(idx < rowIndices.size()); rowIndices[idx] = common::INVALID_ROW_IDX; } }; @@ -215,7 +215,7 @@ class CSRNodeGroup final : public NodeGroup { ChunkedNodeGroup* getPersistentChunkedGroup() const { return persistentChunkGroup.get(); } void setPersistentChunkedGroup(std::unique_ptr chunkedNodeGroup) { - KU_ASSERT(chunkedNodeGroup->getFormat() == NodeGroupDataFormat::CSR); + RYU_ASSERT(chunkedNodeGroup->getFormat() == NodeGroupDataFormat::CSR); persistentChunkGroup = std::move(chunkedNodeGroup); } diff --git a/src/include/storage/table/group_collection.h b/src/include/storage/table/group_collection.h index a22587c2cf..1e840fa832 100644 --- a/src/include/storage/table/group_collection.h +++ b/src/include/storage/table/group_collection.h @@ -30,8 +30,8 @@ class GroupCollection { void removeTrailingGroups([[maybe_unused]] const common::UniqLock& lock, common::idx_t numGroupsToRemove) { - KU_ASSERT(lock.isLocked()); - KU_ASSERT(numGroupsToRemove <= groups.size()); + RYU_ASSERT(lock.isLocked()); + RYU_ASSERT(numGroupsToRemove <= groups.size()); groups.erase(groups.end() - numGroupsToRemove, groups.end()); } @@ -41,26 +41,26 @@ class GroupCollection { } void appendGroup(const common::UniqLock& lock, std::unique_ptr group) { - KU_ASSERT(group); - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(group); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); groups.push_back(std::move(group)); } T* getGroup(const common::UniqLock& lock, common::idx_t groupIdx) const { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); - KU_ASSERT(groupIdx < groups.size()); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); + RYU_ASSERT(groupIdx < groups.size()); return groups[groupIdx].get(); } T* getGroupNoLock(common::idx_t groupIdx) const { - KU_ASSERT(groupIdx < groups.size()); + RYU_ASSERT(groupIdx < groups.size()); return groups[groupIdx].get(); } void replaceGroup(const common::UniqLock& lock, common::idx_t groupIdx, std::unique_ptr group) { - KU_ASSERT(group); - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(group); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); if (groupIdx >= groups.size()) { groups.resize(groupIdx + 1); } @@ -68,8 +68,8 @@ class GroupCollection { } void resize(const common::UniqLock& lock, common::idx_t newSize) { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); if (newSize <= groups.size()) { return; } @@ -77,25 +77,25 @@ class GroupCollection { } bool isEmpty(const common::UniqLock& lock) const { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); return groups.empty(); } common::idx_t getNumGroups(const common::UniqLock& lock) const { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); return groups.size(); } common::idx_t getNumGroupsNoLock() const { return groups.size(); } const std::vector>& getAllGroups(const common::UniqLock& lock) const { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); return groups; } T* getFirstGroup(const common::UniqLock& lock) const { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); if (groups.empty()) { return nullptr; } @@ -108,8 +108,8 @@ class GroupCollection { return groups.front().get(); } T* getLastGroup(const common::UniqLock& lock) const { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); if (groups.empty()) { return nullptr; } @@ -117,8 +117,8 @@ class GroupCollection { } void clear(const common::UniqLock& lock) { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); groups.clear(); } diff --git a/src/include/storage/table/in_mem_chunked_node_group_collection.h b/src/include/storage/table/in_mem_chunked_node_group_collection.h index 0bc6a6254c..8f3d25e758 100644 --- a/src/include/storage/table/in_mem_chunked_node_group_collection.h +++ b/src/include/storage/table/in_mem_chunked_node_group_collection.h @@ -25,7 +25,7 @@ class RYU_API InMemChunkedNodeGroupCollection { return chunkedGroups; } InMemChunkedNodeGroup& getChunkedGroup(common::node_group_idx_t groupIdx) const { - KU_ASSERT(groupIdx < chunkedGroups.size()); + RYU_ASSERT(groupIdx < chunkedGroups.size()); return *chunkedGroups[groupIdx]; } diff --git a/src/include/storage/table/lazy_segment_scanner.h b/src/include/storage/table/lazy_segment_scanner.h index 05ed2203bd..6b0b1ea190 100644 --- a/src/include/storage/table/lazy_segment_scanner.h +++ b/src/include/storage/table/lazy_segment_scanner.h @@ -69,7 +69,7 @@ class LazySegmentScanner : public ColumnChunkScanner { }; inline LazySegmentData& LazySegmentScanner::Iterator::operator*() const { - KU_ASSERT(segmentIdx < segmentScanner.segments.size() && + RYU_ASSERT(segmentIdx < segmentScanner.segments.size() && offsetInSegment < segmentScanner.segments[segmentIdx].length); return segmentScanner.segments[segmentIdx]; } diff --git a/src/include/storage/table/list_chunk_data.h b/src/include/storage/table/list_chunk_data.h index 8c30eb184c..31a5442609 100644 --- a/src/include/storage/table/list_chunk_data.h +++ b/src/include/storage/table/list_chunk_data.h @@ -75,7 +75,7 @@ class RYU_API ListChunkData final : public ColumnChunkData { sizeColumnChunk->setToInMemory(); offsetColumnChunk->setToInMemory(); dataColumnChunk->setToInMemory(); - KU_ASSERT(offsetColumnChunk->getNumValues() == numValues); + RYU_ASSERT(offsetColumnChunk->getNumValues() == numValues); } void resize(uint64_t newCapacity) override { ColumnChunkData::resize(newCapacity); diff --git a/src/include/storage/table/node_group_collection.h b/src/include/storage/table/node_group_collection.h index 578232d1f1..e33b9cc333 100644 --- a/src/include/storage/table/node_group_collection.h +++ b/src/include/storage/table/node_group_collection.h @@ -42,7 +42,7 @@ class NodeGroupCollection { return nodeGroups.getNumGroupsNoLock(); } NodeGroup* getNodeGroupNoLock(const common::node_group_idx_t groupIdx) const { - KU_ASSERT(nodeGroups.getGroupNoLock(groupIdx)->getNodeGroupIdx() == groupIdx); + RYU_ASSERT(nodeGroups.getGroupNoLock(groupIdx)->getNodeGroupIdx() == groupIdx); return nodeGroups.getGroupNoLock(groupIdx); } NodeGroup* getNodeGroup(const common::node_group_idx_t groupIdx, @@ -51,7 +51,7 @@ class NodeGroupCollection { if (mayOutOfBound && groupIdx >= nodeGroups.getNumGroups(lock)) { return nullptr; } - KU_ASSERT(nodeGroups.getGroupNoLock(groupIdx)->getNodeGroupIdx() == groupIdx); + RYU_ASSERT(nodeGroups.getGroupNoLock(groupIdx)->getNodeGroupIdx() == groupIdx); return nodeGroups.getGroup(lock, groupIdx); } NodeGroup* getOrCreateNodeGroup(const transaction::Transaction* transaction, @@ -84,8 +84,8 @@ class NodeGroupCollection { return stats.copy(); } TableStats getStats(const common::UniqLock& lock) const { - KU_ASSERT(lock.isLocked()); - KU_UNUSED(lock); + RYU_ASSERT(lock.isLocked()); + RYU_UNUSED(lock); return stats.copy(); } void mergeStats(const TableStats& stats) { diff --git a/src/include/storage/table/node_table.h b/src/include/storage/table/node_table.h index b06bbba71e..8e149d1e58 100644 --- a/src/include/storage/table/node_table.h +++ b/src/include/storage/table/node_table.h @@ -151,7 +151,7 @@ class RYU_API NodeTable final : public Table { common::column_id_t getPKColumnID() const { return pkColumnID; } PrimaryKeyIndex* getPKIndex() const { const auto index = getIndex(PrimaryKeyIndex::DEFAULT_NAME); - KU_ASSERT(index.has_value()); + RYU_ASSERT(index.has_value()); return &index.value()->cast(); } std::optional> getIndexHolder(const std::string& name); @@ -160,11 +160,11 @@ class RYU_API NodeTable final : public Table { common::column_id_t getNumColumns() const { return columns.size(); } Column& getColumn(common::column_id_t columnID) { - KU_ASSERT(columnID < columns.size()); + RYU_ASSERT(columnID < columns.size()); return *columns[columnID]; } const Column& getColumn(common::column_id_t columnID) const { - KU_ASSERT(columnID < columns.size()); + RYU_ASSERT(columnID < columns.size()); return *columns[columnID]; } diff --git a/src/include/storage/table/rel_table.h b/src/include/storage/table/rel_table.h index 3355c7dd0a..dd2bd6d07d 100644 --- a/src/include/storage/table/rel_table.h +++ b/src/include/storage/table/rel_table.h @@ -181,10 +181,10 @@ class RYU_API RelTable final : public Table { return getDirectedTableData(direction)->getCSRLengthColumn(); } common::column_id_t getNumColumns() const { - KU_ASSERT(directedRelData.size() >= 1); + RYU_ASSERT(directedRelData.size() >= 1); RUNTIME_CHECK(for (const auto& relData : directedRelData) { - KU_ASSERT(relData->getNumColumns() == directedRelData[0]->getNumColumns()); + RYU_ASSERT(relData->getNumColumns() == directedRelData[0]->getNumColumns()); }); return directedRelData[0]->getNumColumns(); } diff --git a/src/include/storage/table/string_chunk_data.h b/src/include/storage/table/string_chunk_data.h index ac9731043e..66671ed7c7 100644 --- a/src/include/storage/table/string_chunk_data.h +++ b/src/include/storage/table/string_chunk_data.h @@ -43,7 +43,7 @@ class StringChunkData final : public ColumnChunkData { template T getValue(common::offset_t /*pos*/) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } uint64_t getStringLength(common::offset_t pos) const { diff --git a/src/include/storage/table/struct_chunk_data.h b/src/include/storage/table/struct_chunk_data.h index d321f09fef..afccb95434 100644 --- a/src/include/storage/table/struct_chunk_data.h +++ b/src/include/storage/table/struct_chunk_data.h @@ -16,11 +16,11 @@ class StructChunkData final : public ColumnChunkData { const ColumnChunkMetadata& metadata); ColumnChunkData* getChild(common::idx_t childIdx) { - KU_ASSERT(childIdx < childChunks.size()); + RYU_ASSERT(childIdx < childChunks.size()); return childChunks[childIdx].get(); } std::unique_ptr moveChild(common::idx_t childIdx) { - KU_ASSERT(childIdx < childChunks.size()); + RYU_ASSERT(childIdx < childChunks.size()); return std::move(childChunks[childIdx]); } @@ -30,7 +30,7 @@ class StructChunkData final : public ColumnChunkData { void resetNumValuesFromMetadata() override; void syncNumValues() override { - KU_ASSERT(!childChunks.empty()); + RYU_ASSERT(!childChunks.empty()); numValues = childChunks[0]->getNumValues(); metadata.numValues = numValues; } @@ -40,11 +40,11 @@ class StructChunkData final : public ColumnChunkData { common::idx_t getNumChildren() const { return childChunks.size(); } const ColumnChunkData& getChild(common::idx_t childIdx) const { - KU_ASSERT(childIdx < childChunks.size()); + RYU_ASSERT(childIdx < childChunks.size()); return *childChunks[childIdx]; } void setChild(common::idx_t childIdx, std::unique_ptr childChunk) { - KU_ASSERT(childIdx < childChunks.size()); + RYU_ASSERT(childIdx < childChunks.size()); childChunks[childIdx] = std::move(childChunk); } diff --git a/src/include/storage/table/struct_column.h b/src/include/storage/table/struct_column.h index 35de298e97..daab63bd82 100644 --- a/src/include/storage/table/struct_column.h +++ b/src/include/storage/table/struct_column.h @@ -16,7 +16,7 @@ class StructColumn final : public Column { PageAllocator& pageAllocator); Column* getChild(common::idx_t childIdx) const { - KU_ASSERT(childIdx < childColumns.size()); + RYU_ASSERT(childIdx < childColumns.size()); return childColumns[childIdx].get(); } void writeSegment(ColumnChunkData& persistentChunk, SegmentState& state, diff --git a/src/include/storage/table/table.h b/src/include/storage/table/table.h index 8b2bf6085e..68fa41a36e 100644 --- a/src/include/storage/table/table.h +++ b/src/include/storage/table/table.h @@ -64,12 +64,12 @@ struct RYU_API TableScanState { // Note that `resetCachedBoundNodeSelVec` is only applicable to RelTable for now. virtual void initState(transaction::Transaction* transaction, NodeGroup* nodeGroup, bool /*resetCachedBoundNodeSelVev*/ = true) { - KU_ASSERT(nodeGroup); + RYU_ASSERT(nodeGroup); this->nodeGroup = nodeGroup; this->nodeGroup->initializeScanState(transaction, *this); } - virtual bool scanNext(transaction::Transaction*) { KU_UNREACHABLE; } + virtual bool scanNext(transaction::Transaction*) { RYU_UNREACHABLE; } void resetOutVectors(); diff --git a/src/include/storage/undo_buffer.h b/src/include/storage/undo_buffer.h index e22a62ee50..0147931e10 100644 --- a/src/include/storage/undo_buffer.h +++ b/src/include/storage/undo_buffer.h @@ -36,7 +36,7 @@ class UndoMemoryBuffer { uint64_t getSize() const { return capacity; } uint64_t getCurrentPosition() const { return currentPosition; } void moveCurrentPosition(uint64_t offset) { - KU_ASSERT(currentPosition + offset <= capacity); + RYU_ASSERT(currentPosition + offset <= capacity); currentPosition += offset; } bool canFit(uint64_t size_) const { return currentPosition + size_ <= this->capacity; } diff --git a/src/include/transaction/transaction.h b/src/include/transaction/transaction.h index 6cd914fc90..7bd0b9373b 100644 --- a/src/include/transaction/transaction.h +++ b/src/include/transaction/transaction.h @@ -109,7 +109,7 @@ class RYU_API Transaction { } bool shouldLogToWAL() const; storage::LocalWAL& getLocalWAL() const { - KU_ASSERT(localWAL); + RYU_ASSERT(localWAL); return *localWAL; } diff --git a/src/main/client_context.cpp b/src/main/client_context.cpp index 5ebf6f4186..24edcdebcc 100644 --- a/src/main/client_context.cpp +++ b/src/main/client_context.cpp @@ -91,7 +91,7 @@ DBConfig* ClientContext::getDBConfigUnsafe() const { } uint64_t ClientContext::getTimeoutRemainingInMS() const { - KU_ASSERT(hasTimeout()); + RYU_ASSERT(hasTimeout()); const auto elapsed = activeQuery.timer.getElapsedTimeInMS(); return elapsed >= clientConfig.timeoutInMS ? 0 : clientConfig.timeoutInMS - elapsed; } @@ -413,7 +413,7 @@ std::vector> ClientContext::parseQuery(std::string_vi parserTimer.stop(); const auto avgRewriteParsingTime = parserTimer.getElapsedTimeMS() / rewrittenStatements.size() / 1.0; - KU_ASSERT(rewrittenStatements.size() >= 1); + RYU_ASSERT(rewrittenStatements.size() >= 1); for (auto j = 0u; j < rewrittenStatements.size() - 1; j++) { rewrittenStatements[j]->setParsingTime(avgParsingTime + avgRewriteParsingTime); rewrittenStatements[j]->setToInternal(); @@ -432,7 +432,7 @@ void ClientContext::validateTransaction(bool readOnly, bool requireTransaction) throw ConnectionException("Cannot execute write operations in a read-only database!"); } if (requireTransaction && transactionContext->hasActiveTransaction()) { - KU_ASSERT(!transactionContext->isAutoTransaction()); + RYU_ASSERT(!transactionContext->isAutoTransaction()); transactionContext->validateManualTransaction(readOnly); } } @@ -573,7 +573,7 @@ ClientContext::TransactionHelper::getAction(bool commitIfNew, bool commitIfAuto) void ClientContext::TransactionHelper::runFuncInTransaction(TransactionContext& context, const std::function& fun, bool readOnlyStatement, bool isTransactionStatement, TransactionCommitAction action) { - KU_ASSERT(context.isAutoTransaction() || context.hasActiveTransaction()); + RYU_ASSERT(context.isAutoTransaction() || context.hasActiveTransaction()); const bool requireNewTransaction = context.isAutoTransaction() && !context.hasActiveTransaction() && !isTransactionStatement; if (requireNewTransaction) { diff --git a/src/main/connection.cpp b/src/main/connection.cpp index 6736baa35e..a9dc0d6197 100644 --- a/src/main/connection.cpp +++ b/src/main/connection.cpp @@ -15,7 +15,7 @@ namespace ryu { namespace main { Connection::Connection(Database* database) { - KU_ASSERT(database != nullptr); + RYU_ASSERT(database != nullptr); this->database = database; this->dbLifeCycleManager = database->dbLifeCycleManager; clientContext = std::make_unique(database); diff --git a/src/main/plan_printer.cpp b/src/main/plan_printer.cpp index ef5273528b..d3d36b9b4a 100644 --- a/src/main/plan_printer.cpp +++ b/src/main/plan_printer.cpp @@ -57,12 +57,12 @@ uint32_t OpProfileBox::getAttributeMaxLen() const { } std::string OpProfileBox::getParamsName(uint32_t idx) const { - KU_ASSERT(idx < paramsNames.size()); + RYU_ASSERT(idx < paramsNames.size()); return paramsNames[idx]; } std::string OpProfileBox::getAttribute(uint32_t idx) const { - KU_ASSERT(idx < attributes.size()); + RYU_ASSERT(idx < attributes.size()); return attributes[idx]; } diff --git a/src/main/prepared_statement.cpp b/src/main/prepared_statement.cpp index a0bbd16408..fe49cc2bde 100644 --- a/src/main/prepared_statement.cpp +++ b/src/main/prepared_statement.cpp @@ -66,7 +66,7 @@ std::unordered_set PreparedStatement::getKnownParameters() { } void PreparedStatement::updateParameter(const std::string& name, Value* value) { - KU_ASSERT(parameterMap.contains(name)); + RYU_ASSERT(parameterMap.contains(name)); validateParam(name, value, parameterMap.at(name).get()); *parameterMap.at(name) = std::move(*value); } diff --git a/src/main/prepared_statement_manager.cpp b/src/main/prepared_statement_manager.cpp index e6cb8cc28b..5a21988d4c 100644 --- a/src/main/prepared_statement_manager.cpp +++ b/src/main/prepared_statement_manager.cpp @@ -21,7 +21,7 @@ std::string CachedPreparedStatementManager::addStatement( CachedPreparedStatement* CachedPreparedStatementManager::getCachedStatement( const std::string& name) const { - KU_ASSERT(containsStatement(name)); + RYU_ASSERT(containsStatement(name)); return statementMap.at(name).get(); } diff --git a/src/main/settings.cpp b/src/main/settings.cpp index 0c395ea3a0..27726bff7f 100644 --- a/src/main/settings.cpp +++ b/src/main/settings.cpp @@ -140,7 +140,7 @@ common::Value RecursivePatternFactorSetting::getSetting(const ClientContext* con } void EnableMVCCSetting::setContext(ClientContext* context, const common::Value& parameter) { - KU_ASSERT(parameter.getDataType().getLogicalTypeID() == common::LogicalTypeID::BOOL); + RYU_ASSERT(parameter.getDataType().getLogicalTypeID() == common::LogicalTypeID::BOOL); // TODO: This is a temporary solution to make tests of multiple write transactions easier. context->getDBConfigUnsafe()->enableMultiWrites = parameter.getValue(); } diff --git a/src/optimizer/acc_hash_join_optimizer.cpp b/src/optimizer/acc_hash_join_optimizer.cpp index a9c81e13d4..1696bcb613 100644 --- a/src/optimizer/acc_hash_join_optimizer.cpp +++ b/src/optimizer/acc_hash_join_optimizer.cpp @@ -51,11 +51,11 @@ static std::vector getTableIDs(const LogicalOperator* op, return getTableIDs(node.getEntries()); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -97,7 +97,7 @@ static bool haveSameType(const std::vector& ops) { bool sanityCheckCandidates(const std::vector& ops, SemiMaskTargetType targetType) { - KU_ASSERT(!ops.empty()); + RYU_ASSERT(!ops.empty()); if (!haveSameType(ops)) { return false; } @@ -214,7 +214,7 @@ static std::shared_ptr tryApplySemiMask(std::shared_ptrcast().setInputNodeMask(); } auto targetType = SemiMaskTargetType::RECURSIVE_EXTEND_INPUT_NODE; - KU_ASSERT(sanityCheckCandidates(recursiveExtendInputNodeCandidates, targetType)); + RYU_ASSERT(sanityCheckCandidates(recursiveExtendInputNodeCandidates, targetType)); return appendSemiMasker(SemiMaskKeyType::NODE, targetType, std::move(nodeID), recursiveExtendInputNodeCandidates, std::move(fromRoot)); } @@ -224,7 +224,7 @@ static std::shared_ptr tryApplySemiMask(std::shared_ptrcast().setOutputNodeMask(); } auto targetType = SemiMaskTargetType::RECURSIVE_EXTEND_OUTPUT_NODE; - KU_ASSERT(sanityCheckCandidates(recursiveExtendNodeCandidates, targetType)); + RYU_ASSERT(sanityCheckCandidates(recursiveExtendNodeCandidates, targetType)); return appendSemiMasker(SemiMaskKeyType::NODE, targetType, std::move(nodeID), recursiveExtendNodeCandidates, std::move(fromRoot)); } @@ -392,7 +392,7 @@ void HashJoinSIPOptimizer::visitPathPropertyProbe(LogicalOperator* op) { if (opsToApplySemiMask.empty()) { return; } - KU_ASSERT( + RYU_ASSERT( pathPropertyProbe.getChild(0)->getOperatorType() == LogicalOperatorType::RECURSIVE_EXTEND); auto semiMasker = appendSemiMasker(SemiMaskKeyType::NODE_ID_LIST, SemiMaskTargetType::SCAN_NODE, recursiveRel->getRecursiveInfo()->bindData->pathNodeIDsExpr, opsToApplySemiMask, diff --git a/src/optimizer/cardinality_updater.cpp b/src/optimizer/cardinality_updater.cpp index e85d9e077c..d9fcaf7ede 100644 --- a/src/optimizer/cardinality_updater.cpp +++ b/src/optimizer/cardinality_updater.cpp @@ -79,7 +79,7 @@ void CardinalityUpdater::visitScanNodeTable(planner::LogicalOperator* op) { } void CardinalityUpdater::visitExtend(planner::LogicalOperator* op) { - KU_ASSERT(transaction); + RYU_ASSERT(transaction); auto& extend = op->cast(); const auto extensionRate = cardinalityEstimator.getExtensionRate(*extend.getRel(), *extend.getBoundNode(), transaction); @@ -89,7 +89,7 @@ void CardinalityUpdater::visitExtend(planner::LogicalOperator* op) { void CardinalityUpdater::visitHashJoin(planner::LogicalOperator* op) { auto& hashJoin = op->cast(); - KU_ASSERT(hashJoin.getNumChildren() >= 2); + RYU_ASSERT(hashJoin.getNumChildren() >= 2); hashJoin.setCardinality(cardinalityEstimator.estimateHashJoin(hashJoin.getJoinConditions(), *hashJoin.getChild(0), *hashJoin.getChild(1))); } @@ -101,7 +101,7 @@ void CardinalityUpdater::visitCrossProduct(planner::LogicalOperator* op) { void CardinalityUpdater::visitIntersect(planner::LogicalOperator* op) { auto& intersect = op->cast(); - KU_ASSERT(intersect.getNumChildren() >= 2); + RYU_ASSERT(intersect.getNumChildren() >= 2); std::vector buildOps; for (uint32_t i = 1; i < intersect.getNumChildren(); ++i) { buildOps.push_back(intersect.getChild(i).get()); diff --git a/src/optimizer/filter_push_down_optimizer.cpp b/src/optimizer/filter_push_down_optimizer.cpp index 8c9353acbf..162d11fa96 100644 --- a/src/optimizer/filter_push_down_optimizer.cpp +++ b/src/optimizer/filter_push_down_optimizer.cpp @@ -91,7 +91,7 @@ std::shared_ptr FilterPushDownOptimizer::visitCrossProductRepla remainingPSet.addPredicate(p); } } - KU_ASSERT(op->getNumChildren() == 2); + RYU_ASSERT(op->getNumChildren() == 2); // Push probe side auto probeOptimizer = FilterPushDownOptimizer(context, std::move(probePSet)); op->setChild(0, probeOptimizer.visitOperator(op->getChild(0))); diff --git a/src/optimizer/projection_push_down_optimizer.cpp b/src/optimizer/projection_push_down_optimizer.cpp index b2c692e127..f05bddfcec 100644 --- a/src/optimizer/projection_push_down_optimizer.cpp +++ b/src/optimizer/projection_push_down_optimizer.cpp @@ -49,7 +49,7 @@ void ProjectionPushDownOptimizer::visitOperator(LogicalOperator* op) { void ProjectionPushDownOptimizer::visitPathPropertyProbe(LogicalOperator* op) { auto& pathPropertyProbe = op->cast(); auto child = pathPropertyProbe.getChild(0); - KU_ASSERT(child->getOperatorType() == LogicalOperatorType::RECURSIVE_EXTEND); + RYU_ASSERT(child->getOperatorType() == LogicalOperatorType::RECURSIVE_EXTEND); if (nodeOrRelInUse.contains(pathPropertyProbe.getRel())) { return; // Path is needed } @@ -190,7 +190,7 @@ void ProjectionPushDownOptimizer::visitInsert(LogicalOperator* op) { void ProjectionPushDownOptimizer::visitDelete(LogicalOperator* op) { auto& delete_ = op->constCast(); auto& infos = delete_.getInfos(); - KU_ASSERT(!infos.empty()); + RYU_ASSERT(!infos.empty()); switch (infos[0].tableType) { case TableType::NODE: { for (auto& info : infos) { @@ -206,14 +206,14 @@ void ProjectionPushDownOptimizer::visitDelete(LogicalOperator* op) { auto& rel = info.pattern->constCast(); collectExpressionsInUse(rel.getSrcNode()->getInternalID()); collectExpressionsInUse(rel.getDstNode()->getInternalID()); - KU_ASSERT(rel.getRelType() == QueryRelType::NON_RECURSIVE); + RYU_ASSERT(rel.getRelType() == QueryRelType::NON_RECURSIVE); if (!rel.isEmpty()) { collectExpressionsInUse(rel.getInternalID()); } } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -279,7 +279,7 @@ void ProjectionPushDownOptimizer::visitSetInfo(const binder::BoundSetPropertyInf collectExpressionsInUse(rel.getInternalID()); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } collectExpressionsInUse(info.columnData); } diff --git a/src/optimizer/top_k_optimizer.cpp b/src/optimizer/top_k_optimizer.cpp index f5e183f40c..d45d35b49d 100644 --- a/src/optimizer/top_k_optimizer.cpp +++ b/src/optimizer/top_k_optimizer.cpp @@ -36,7 +36,7 @@ std::shared_ptr TopKOptimizer::visitLimitReplace( return op; // only skip no limit. No need to rewrite } auto multiplicityReducer = limit->getChild(0); - KU_ASSERT(multiplicityReducer->getOperatorType() == LogicalOperatorType::MULTIPLICITY_REDUCER); + RYU_ASSERT(multiplicityReducer->getOperatorType() == LogicalOperatorType::MULTIPLICITY_REDUCER); auto projectionOrOrderBy = multiplicityReducer->getChild(0); std::shared_ptr orderBy; if (projectionOrOrderBy->getOperatorType() == LogicalOperatorType::PROJECTION) { @@ -49,7 +49,7 @@ std::shared_ptr TopKOptimizer::visitLimitReplace( } else { return op; } - KU_ASSERT(orderBy != nullptr); + RYU_ASSERT(orderBy != nullptr); if (limit->hasLimitNum()) { orderBy->setLimitNum(limit->getLimitNum()); } diff --git a/src/parser/expression/parsed_expression.cpp b/src/parser/expression/parsed_expression.cpp index 32d8f1b097..4447ee65c2 100644 --- a/src/parser/expression/parsed_expression.cpp +++ b/src/parser/expression/parsed_expression.cpp @@ -69,7 +69,7 @@ std::unique_ptr ParsedExpression::deserialize(Deserializer& de parsedExpression = ParsedVariableExpression::deserialize(deserializer); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } parsedExpression->alias = std::move(alias); diff --git a/src/parser/expression/parsed_expression_visitor.cpp b/src/parser/expression/parsed_expression_visitor.cpp index f183839249..39ca0827bd 100644 --- a/src/parser/expression/parsed_expression_visitor.cpp +++ b/src/parser/expression/parsed_expression_visitor.cpp @@ -163,7 +163,7 @@ void ReadWriteExprAnalyzer::visitFunctionExpr(const ParsedExpression* expr) { return; } auto& funcSet = entry->constPtrCast()->getFunctionSet(); - KU_ASSERT(!funcSet.empty()); + RYU_ASSERT(!funcSet.empty()); if (!funcSet[0]->isReadOnly) { readOnly = false; } diff --git a/src/parser/parsed_statement_visitor.cpp b/src/parser/parsed_statement_visitor.cpp index c24b14f908..6324f31041 100644 --- a/src/parser/parsed_statement_visitor.cpp +++ b/src/parser/parsed_statement_visitor.cpp @@ -72,7 +72,7 @@ void StatementVisitor::visit(const Statement& statement) { visitExtensionClause(statement); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -128,7 +128,7 @@ void StatementVisitor::visitReadingClause(const ReadingClause* readingClause) { visitLoadFrom(readingClause); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -147,7 +147,7 @@ void StatementVisitor::visitUpdatingClause(const UpdatingClause* updatingClause) visitMerge(updatingClause); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/parser/transform/transform_attach_database.cpp b/src/parser/transform/transform_attach_database.cpp index b4c1932c35..1b597f3494 100644 --- a/src/parser/transform/transform_attach_database.cpp +++ b/src/parser/transform/transform_attach_database.cpp @@ -5,11 +5,11 @@ namespace ryu { namespace parser { std::unique_ptr Transformer::transformAttachDatabase( - CypherParser::KU_AttachDatabaseContext& ctx) { + CypherParser::RU_AttachDatabaseContext& ctx) { auto dbPath = transformStringLiteral(*ctx.StringLiteral()); auto dbAlias = ctx.oC_SchemaName() ? transformSchemaName(*ctx.oC_SchemaName()) : ""; auto dbType = transformSymbolicName(*ctx.oC_SymbolicName()); - auto attachOption = ctx.kU_Options() ? transformOptions(*ctx.kU_Options()) : options_t{}; + auto attachOption = ctx.rU_Options() ? transformOptions(*ctx.rU_Options()) : options_t{}; AttachInfo attachInfo{std::move(dbPath), std::move(dbAlias), std::move(dbType), std::move(attachOption)}; return std::make_unique(std::move(attachInfo)); diff --git a/src/parser/transform/transform_copy.cpp b/src/parser/transform/transform_copy.cpp index baeec86240..beee50c19d 100644 --- a/src/parser/transform/transform_copy.cpp +++ b/src/parser/transform/transform_copy.cpp @@ -9,34 +9,34 @@ using namespace ryu::common; namespace ryu { namespace parser { -std::unique_ptr Transformer::transformCopyTo(CypherParser::KU_CopyTOContext& ctx) { +std::unique_ptr Transformer::transformCopyTo(CypherParser::RU_CopyTOContext& ctx) { std::string filePath = transformStringLiteral(*ctx.StringLiteral()); auto regularQuery = transformQuery(*ctx.oC_Query()); auto copyTo = std::make_unique(std::move(filePath), std::move(regularQuery)); - if (ctx.kU_Options()) { - copyTo->setParsingOption(transformOptions(*ctx.kU_Options())); + if (ctx.rU_Options()) { + copyTo->setParsingOption(transformOptions(*ctx.rU_Options())); } return copyTo; } -std::unique_ptr Transformer::transformCopyFrom(CypherParser::KU_CopyFromContext& ctx) { - auto source = transformScanSource(*ctx.kU_ScanSource()); +std::unique_ptr Transformer::transformCopyFrom(CypherParser::RU_CopyFromContext& ctx) { + auto source = transformScanSource(*ctx.rU_ScanSource()); auto tableName = transformSchemaName(*ctx.oC_SchemaName()); auto copyFrom = std::make_unique(std::move(source), std::move(tableName)); CopyFromColumnInfo info; - info.inputColumnOrder = ctx.kU_ColumnNames(); - if (ctx.kU_ColumnNames()) { - info.columnNames = transformColumnNames(*ctx.kU_ColumnNames()); + info.inputColumnOrder = ctx.rU_ColumnNames(); + if (ctx.rU_ColumnNames()) { + info.columnNames = transformColumnNames(*ctx.rU_ColumnNames()); } - if (ctx.kU_Options()) { - copyFrom->setParsingOption(transformOptions(*ctx.kU_Options())); + if (ctx.rU_Options()) { + copyFrom->setParsingOption(transformOptions(*ctx.rU_Options())); } copyFrom->setColumnInfo(std::move(info)); return copyFrom; } std::unique_ptr Transformer::transformCopyFromByColumn( - CypherParser::KU_CopyFromByColumnContext& ctx) { + CypherParser::RU_CopyFromByColumnContext& ctx) { auto source = std::make_unique(transformFilePaths(ctx.StringLiteral())); auto tableName = transformSchemaName(*ctx.oC_SchemaName()); auto copyFrom = std::make_unique(std::move(source), std::move(tableName)); @@ -45,7 +45,7 @@ std::unique_ptr Transformer::transformCopyFromByColumn( } std::vector Transformer::transformColumnNames( - CypherParser::KU_ColumnNamesContext& ctx) { + CypherParser::RU_ColumnNamesContext& ctx) { std::vector columnNames; for (auto& schemaName : ctx.oC_SchemaName()) { columnNames.push_back(transformSchemaName(*schemaName)); @@ -64,9 +64,9 @@ std::vector Transformer::transformFilePaths( } std::unique_ptr Transformer::transformScanSource( - CypherParser::KU_ScanSourceContext& ctx) { - if (ctx.kU_FilePaths()) { - auto filePaths = transformFilePaths(ctx.kU_FilePaths()->StringLiteral()); + CypherParser::RU_ScanSourceContext& ctx) { + if (ctx.rU_FilePaths()) { + auto filePaths = transformFilePaths(ctx.rU_FilePaths()->StringLiteral()); return std::make_unique(std::move(filePaths)); } else if (ctx.oC_Query()) { auto query = transformQuery(*ctx.oC_Query()); @@ -85,12 +85,12 @@ std::unique_ptr Transformer::transformScanSource( auto paramExpression = transformParameterExpression(*ctx.oC_Parameter()); return std::make_unique(std::move(paramExpression)); } - KU_UNREACHABLE; + RYU_UNREACHABLE; } -options_t Transformer::transformOptions(CypherParser::KU_OptionsContext& ctx) { +options_t Transformer::transformOptions(CypherParser::RU_OptionsContext& ctx) { options_t options; - for (auto loadOption : ctx.kU_Option()) { + for (auto loadOption : ctx.rU_Option()) { auto optionName = transformSymbolicName(*loadOption->oC_SymbolicName()); // Check if the literal exists, otherwise set the value to true by default if (loadOption->oC_Literal()) { diff --git a/src/parser/transform/transform_ddl.cpp b/src/parser/transform/transform_ddl.cpp index 25e8c95ea2..59d3f8f21f 100644 --- a/src/parser/transform/transform_ddl.cpp +++ b/src/parser/transform/transform_ddl.cpp @@ -15,42 +15,42 @@ namespace ryu { namespace parser { std::unique_ptr Transformer::transformAlterTable( - CypherParser::KU_AlterTableContext& ctx) { - if (ctx.kU_AlterOptions()->kU_AddProperty()) { + CypherParser::RU_AlterTableContext& ctx) { + if (ctx.rU_AlterOptions()->rU_AddProperty()) { return transformAddProperty(ctx); } - if (ctx.kU_AlterOptions()->kU_DropProperty()) { + if (ctx.rU_AlterOptions()->rU_DropProperty()) { return transformDropProperty(ctx); } - if (ctx.kU_AlterOptions()->kU_RenameTable()) { + if (ctx.rU_AlterOptions()->rU_RenameTable()) { return transformRenameTable(ctx); } - if (ctx.kU_AlterOptions()->kU_AddFromToConnection()) { + if (ctx.rU_AlterOptions()->rU_AddFromToConnection()) { return transformAddFromToConnection(ctx); } - if (ctx.kU_AlterOptions()->kU_DropFromToConnection()) { + if (ctx.rU_AlterOptions()->rU_DropFromToConnection()) { return transformDropFromToConnection(ctx); } return transformRenameProperty(ctx); } -std::string Transformer::getPKName(CypherParser::KU_CreateNodeTableContext& ctx) { +std::string Transformer::getPKName(CypherParser::RU_CreateNodeTableContext& ctx) { auto pkCount = 0; std::string pkName; - auto& propertyDefinitions = *ctx.kU_PropertyDefinitions(); - for (auto& definition : propertyDefinitions.kU_PropertyDefinition()) { + auto& propertyDefinitions = *ctx.rU_PropertyDefinitions(); + for (auto& definition : propertyDefinitions.rU_PropertyDefinition()) { if (definition->PRIMARY() && definition->KEY()) { pkCount++; - pkName = transformPrimaryKey(*definition->kU_ColumnDefinition()); + pkName = transformPrimaryKey(*definition->rU_ColumnDefinition()); } } - if (ctx.kU_CreateNodeConstraint()) { + if (ctx.rU_CreateNodeConstraint()) { // In the case where no pkName has been found, or the Node Constraint's name is different // than the pkName found, add the counter. - if (pkCount == 0 || transformPrimaryKey(*ctx.kU_CreateNodeConstraint()) != pkName) { + if (pkCount == 0 || transformPrimaryKey(*ctx.rU_CreateNodeConstraint()) != pkName) { pkCount++; } - pkName = transformPrimaryKey(*ctx.kU_CreateNodeConstraint()); + pkName = transformPrimaryKey(*ctx.rU_CreateNodeConstraint()); } if (pkCount == 0) { // Raise exception when no PRIMARY KEY is specified. @@ -62,7 +62,7 @@ std::string Transformer::getPKName(CypherParser::KU_CreateNodeTableContext& ctx) return pkName; } -ConflictAction Transformer::transformConflictAction(CypherParser::KU_IfNotExistsContext* ctx) { +ConflictAction Transformer::transformConflictAction(CypherParser::RU_IfNotExistsContext* ctx) { if (ctx != nullptr) { return ConflictAction::ON_CONFLICT_DO_NOTHING; } @@ -70,35 +70,35 @@ ConflictAction Transformer::transformConflictAction(CypherParser::KU_IfNotExists } std::unique_ptr Transformer::transformCreateNodeTable( - CypherParser::KU_CreateNodeTableContext& ctx) { + CypherParser::RU_CreateNodeTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); auto createTableInfo = - CreateTableInfo(TableType::NODE, tableName, transformConflictAction(ctx.kU_IfNotExists())); + CreateTableInfo(TableType::NODE, tableName, transformConflictAction(ctx.rU_IfNotExists())); // If CREATE NODE TABLE AS syntax if (ctx.oC_Query()) { return std::make_unique(std::move(createTableInfo), std::make_unique(transformQuery(*ctx.oC_Query()))); } else { createTableInfo.propertyDefinitions = - transformPropertyDefinitions(*ctx.kU_PropertyDefinitions()); + transformPropertyDefinitions(*ctx.rU_PropertyDefinitions()); createTableInfo.extraInfo = std::make_unique(getPKName(ctx)); return std::make_unique(std::move(createTableInfo)); } } std::unique_ptr Transformer::transformCreateRelGroup( - CypherParser::KU_CreateRelTableContext& ctx) { + CypherParser::RU_CreateRelTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); std::string relMultiplicity = "MANY_MANY"; if (ctx.oC_SymbolicName()) { relMultiplicity = transformSymbolicName(*ctx.oC_SymbolicName()); } options_t options; - if (ctx.kU_Options()) { - options = transformOptions(*ctx.kU_Options()); + if (ctx.rU_Options()) { + options = transformOptions(*ctx.rU_Options()); } std::vector> fromToPairs; - for (auto& fromTo : ctx.kU_FromToConnections()->kU_FromToConnection()) { + for (auto& fromTo : ctx.rU_FromToConnections()->rU_FromToConnection()) { auto src = transformSchemaName(*fromTo->oC_SchemaName(0)); auto dst = transformSchemaName(*fromTo->oC_SchemaName(1)); fromToPairs.emplace_back(src, dst); @@ -106,11 +106,11 @@ std::unique_ptr Transformer::transformCreateRelGroup( std::unique_ptr extraInfo = std::make_unique(relMultiplicity, std::move(fromToPairs), std::move(options)); - auto conflictAction = transformConflictAction(ctx.kU_IfNotExists()); + auto conflictAction = transformConflictAction(ctx.rU_IfNotExists()); auto createTableInfo = CreateTableInfo(common::TableType::REL, tableName, conflictAction); - if (ctx.kU_PropertyDefinitions()) { + if (ctx.rU_PropertyDefinitions()) { createTableInfo.propertyDefinitions = - transformPropertyDefinitions(*ctx.kU_PropertyDefinitions()); + transformPropertyDefinitions(*ctx.rU_PropertyDefinitions()); } createTableInfo.extraInfo = std::move(extraInfo); if (ctx.oC_Query()) { @@ -122,49 +122,49 @@ std::unique_ptr Transformer::transformCreateRelGroup( } std::unique_ptr Transformer::transformCreateSequence( - CypherParser::KU_CreateSequenceContext& ctx) { + CypherParser::RU_CreateSequenceContext& ctx) { auto sequenceName = transformSchemaName(*ctx.oC_SchemaName()); auto createSequenceInfo = CreateSequenceInfo(sequenceName, - ctx.kU_IfNotExists() ? common::ConflictAction::ON_CONFLICT_DO_NOTHING : + ctx.rU_IfNotExists() ? common::ConflictAction::ON_CONFLICT_DO_NOTHING : common::ConflictAction::ON_CONFLICT_THROW); std::unordered_set applied; - for (auto seqOption : ctx.kU_SequenceOptions()) { + for (auto seqOption : ctx.rU_SequenceOptions()) { SequenceInfoType type; // NOLINT(*-init-variables) std::string typeString; CypherParser::OC_IntegerLiteralContext* valCtx = nullptr; std::string* valOption = nullptr; - if (seqOption->kU_StartWith()) { + if (seqOption->rU_StartWith()) { type = SequenceInfoType::START; typeString = "START"; - valCtx = seqOption->kU_StartWith()->oC_IntegerLiteral(); + valCtx = seqOption->rU_StartWith()->oC_IntegerLiteral(); valOption = &createSequenceInfo.startWith; - *valOption = seqOption->kU_StartWith()->MINUS() ? "-" : ""; - } else if (seqOption->kU_IncrementBy()) { + *valOption = seqOption->rU_StartWith()->MINUS() ? "-" : ""; + } else if (seqOption->rU_IncrementBy()) { type = SequenceInfoType::INCREMENT; typeString = "INCREMENT"; - valCtx = seqOption->kU_IncrementBy()->oC_IntegerLiteral(); + valCtx = seqOption->rU_IncrementBy()->oC_IntegerLiteral(); valOption = &createSequenceInfo.increment; - *valOption = seqOption->kU_IncrementBy()->MINUS() ? "-" : ""; - } else if (seqOption->kU_MinValue()) { + *valOption = seqOption->rU_IncrementBy()->MINUS() ? "-" : ""; + } else if (seqOption->rU_MinValue()) { type = SequenceInfoType::MINVALUE; typeString = "MINVALUE"; - if (!seqOption->kU_MinValue()->NO()) { - valCtx = seqOption->kU_MinValue()->oC_IntegerLiteral(); + if (!seqOption->rU_MinValue()->NO()) { + valCtx = seqOption->rU_MinValue()->oC_IntegerLiteral(); valOption = &createSequenceInfo.minValue; - *valOption = seqOption->kU_MinValue()->MINUS() ? "-" : ""; + *valOption = seqOption->rU_MinValue()->MINUS() ? "-" : ""; } - } else if (seqOption->kU_MaxValue()) { + } else if (seqOption->rU_MaxValue()) { type = SequenceInfoType::MAXVALUE; typeString = "MAXVALUE"; - if (!seqOption->kU_MaxValue()->NO()) { - valCtx = seqOption->kU_MaxValue()->oC_IntegerLiteral(); + if (!seqOption->rU_MaxValue()->NO()) { + valCtx = seqOption->rU_MaxValue()->oC_IntegerLiteral(); valOption = &createSequenceInfo.maxValue; - *valOption = seqOption->kU_MaxValue()->MINUS() ? "-" : ""; + *valOption = seqOption->rU_MaxValue()->MINUS() ? "-" : ""; } - } else { // seqOption->kU_Cycle() + } else { // seqOption->rU_Cycle() type = SequenceInfoType::CYCLE; typeString = "CYCLE"; - if (!seqOption->kU_Cycle()->NO()) { + if (!seqOption->rU_Cycle()->NO()) { createSequenceInfo.cycle = true; } } @@ -181,13 +181,13 @@ std::unique_ptr Transformer::transformCreateSequence( } std::unique_ptr Transformer::transformCreateType( - CypherParser::KU_CreateTypeContext& ctx) { + CypherParser::RU_CreateTypeContext& ctx) { auto name = transformSchemaName(*ctx.oC_SchemaName()); - auto type = transformDataType(*ctx.kU_DataType()); + auto type = transformDataType(*ctx.rU_DataType()); return std::make_unique(name, type); } -DropType transformDropType(CypherParser::KU_DropContext& ctx) { +DropType transformDropType(CypherParser::RU_DropContext& ctx) { if (ctx.TABLE()) { return DropType::TABLE; } else if (ctx.SEQUENCE()) { @@ -195,39 +195,39 @@ DropType transformDropType(CypherParser::KU_DropContext& ctx) { } else if (ctx.MACRO()) { return DropType::MACRO; } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } -std::unique_ptr Transformer::transformDrop(CypherParser::KU_DropContext& ctx) { +std::unique_ptr Transformer::transformDrop(CypherParser::RU_DropContext& ctx) { auto name = transformSchemaName(*ctx.oC_SchemaName()); auto dropType = transformDropType(ctx); - auto conflictAction = ctx.kU_IfExists() ? common::ConflictAction::ON_CONFLICT_DO_NOTHING : + auto conflictAction = ctx.rU_IfExists() ? common::ConflictAction::ON_CONFLICT_DO_NOTHING : common::ConflictAction::ON_CONFLICT_THROW; return std::make_unique(DropInfo{std::move(name), dropType, conflictAction}); } std::unique_ptr Transformer::transformRenameTable( - CypherParser::KU_AlterTableContext& ctx) { + CypherParser::RU_AlterTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); - auto newName = transformSchemaName(*ctx.kU_AlterOptions()->kU_RenameTable()->oC_SchemaName()); + auto newName = transformSchemaName(*ctx.rU_AlterOptions()->rU_RenameTable()->oC_SchemaName()); auto extraInfo = std::make_unique(std::move(newName)); auto info = AlterInfo(AlterType::RENAME, tableName, std::move(extraInfo)); return std::make_unique(std::move(info)); } std::unique_ptr Transformer::transformAddFromToConnection( - CypherParser::KU_AlterTableContext& ctx) { + CypherParser::RU_AlterTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); auto schemaNameCtx = - ctx.kU_AlterOptions()->kU_AddFromToConnection()->kU_FromToConnection()->oC_SchemaName(); - KU_ASSERT(schemaNameCtx.size() == 2); + ctx.rU_AlterOptions()->rU_AddFromToConnection()->rU_FromToConnection()->oC_SchemaName(); + RYU_ASSERT(schemaNameCtx.size() == 2); auto srcTableName = transformSchemaName(*schemaNameCtx[0]); auto dstTableName = transformSchemaName(*schemaNameCtx[1]); auto extraInfo = std::make_unique(std::move(srcTableName), std::move(dstTableName)); ConflictAction action = ConflictAction::ON_CONFLICT_THROW; - if (ctx.kU_AlterOptions()->kU_AddFromToConnection()->kU_IfNotExists()) { + if (ctx.rU_AlterOptions()->rU_AddFromToConnection()->rU_IfNotExists()) { action = ConflictAction::ON_CONFLICT_DO_NOTHING; } auto info = AlterInfo(AlterType::ADD_FROM_TO_CONNECTION, std::move(tableName), @@ -236,17 +236,17 @@ std::unique_ptr Transformer::transformAddFromToConnection( } std::unique_ptr Transformer::transformDropFromToConnection( - CypherParser::KU_AlterTableContext& ctx) { + CypherParser::RU_AlterTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); auto schemaNameCtx = - ctx.kU_AlterOptions()->kU_DropFromToConnection()->kU_FromToConnection()->oC_SchemaName(); - KU_ASSERT(schemaNameCtx.size() == 2); + ctx.rU_AlterOptions()->rU_DropFromToConnection()->rU_FromToConnection()->oC_SchemaName(); + RYU_ASSERT(schemaNameCtx.size() == 2); auto srcTableName = transformSchemaName(*schemaNameCtx[0]); auto dstTableName = transformSchemaName(*schemaNameCtx[1]); auto extraInfo = std::make_unique(std::move(srcTableName), std::move(dstTableName)); ConflictAction action = ConflictAction::ON_CONFLICT_THROW; - if (ctx.kU_AlterOptions()->kU_DropFromToConnection()->kU_IfExists()) { + if (ctx.rU_AlterOptions()->rU_DropFromToConnection()->rU_IfExists()) { action = ConflictAction::ON_CONFLICT_DO_NOTHING; } auto info = AlterInfo(AlterType::DROP_FROM_TO_CONNECTION, std::move(tableName), @@ -255,19 +255,19 @@ std::unique_ptr Transformer::transformDropFromToConnection( } std::unique_ptr Transformer::transformAddProperty( - CypherParser::KU_AlterTableContext& ctx) { + CypherParser::RU_AlterTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); - auto addPropertyCtx = ctx.kU_AlterOptions()->kU_AddProperty(); + auto addPropertyCtx = ctx.rU_AlterOptions()->rU_AddProperty(); auto propertyName = transformPropertyKeyName(*addPropertyCtx->oC_PropertyKeyName()); - auto dataType = transformDataType(*addPropertyCtx->kU_DataType()); + auto dataType = transformDataType(*addPropertyCtx->rU_DataType()); std::unique_ptr defaultValue = nullptr; - if (addPropertyCtx->kU_Default()) { - defaultValue = transformExpression(*addPropertyCtx->kU_Default()->oC_Expression()); + if (addPropertyCtx->rU_Default()) { + defaultValue = transformExpression(*addPropertyCtx->rU_Default()->oC_Expression()); } auto extraInfo = std::make_unique(std::move(propertyName), std::move(dataType), std::move(defaultValue)); ConflictAction action = ConflictAction::ON_CONFLICT_THROW; - if (addPropertyCtx->kU_IfNotExists()) { + if (addPropertyCtx->rU_IfNotExists()) { action = ConflictAction::ON_CONFLICT_DO_NOTHING; } auto info = AlterInfo(AlterType::ADD_PROPERTY, tableName, std::move(extraInfo), action); @@ -275,13 +275,13 @@ std::unique_ptr Transformer::transformAddProperty( } std::unique_ptr Transformer::transformDropProperty( - CypherParser::KU_AlterTableContext& ctx) { + CypherParser::RU_AlterTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); - auto dropProperty = ctx.kU_AlterOptions()->kU_DropProperty(); + auto dropProperty = ctx.rU_AlterOptions()->rU_DropProperty(); auto propertyName = transformPropertyKeyName(*dropProperty->oC_PropertyKeyName()); auto extraInfo = std::make_unique(std::move(propertyName)); ConflictAction action = ConflictAction::ON_CONFLICT_THROW; - if (dropProperty->kU_IfExists()) { + if (dropProperty->rU_IfExists()) { action = ConflictAction::ON_CONFLICT_DO_NOTHING; } auto info = AlterInfo(AlterType::DROP_PROPERTY, tableName, std::move(extraInfo), action); @@ -289,18 +289,18 @@ std::unique_ptr Transformer::transformDropProperty( } std::unique_ptr Transformer::transformRenameProperty( - CypherParser::KU_AlterTableContext& ctx) { + CypherParser::RU_AlterTableContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); auto propertyName = transformPropertyKeyName( - *ctx.kU_AlterOptions()->kU_RenameProperty()->oC_PropertyKeyName()[0]); + *ctx.rU_AlterOptions()->rU_RenameProperty()->oC_PropertyKeyName()[0]); auto newName = transformPropertyKeyName( - *ctx.kU_AlterOptions()->kU_RenameProperty()->oC_PropertyKeyName()[1]); + *ctx.rU_AlterOptions()->rU_RenameProperty()->oC_PropertyKeyName()[1]); auto extraInfo = std::make_unique(propertyName, newName); auto info = AlterInfo(AlterType::RENAME_PROPERTY, tableName, std::move(extraInfo)); return std::make_unique(std::move(info)); } -std::unique_ptr Transformer::transformCommentOn(CypherParser::KU_CommentOnContext& ctx) { +std::unique_ptr Transformer::transformCommentOn(CypherParser::RU_CommentOnContext& ctx) { auto tableName = transformSchemaName(*ctx.oC_SchemaName()); auto comment = transformStringLiteral(*ctx.StringLiteral()); auto extraInfo = std::make_unique(comment); @@ -309,29 +309,29 @@ std::unique_ptr Transformer::transformCommentOn(CypherParser::KU_Comm } std::vector Transformer::transformColumnDefinitions( - CypherParser::KU_ColumnDefinitionsContext& ctx) { + CypherParser::RU_ColumnDefinitionsContext& ctx) { std::vector definitions; - for (auto& definition : ctx.kU_ColumnDefinition()) { + for (auto& definition : ctx.rU_ColumnDefinition()) { definitions.emplace_back(transformColumnDefinition(*definition)); } return definitions; } ParsedColumnDefinition Transformer::transformColumnDefinition( - CypherParser::KU_ColumnDefinitionContext& ctx) { + CypherParser::RU_ColumnDefinitionContext& ctx) { auto propertyName = transformPropertyKeyName(*ctx.oC_PropertyKeyName()); - auto dataType = transformDataType(*ctx.kU_DataType()); + auto dataType = transformDataType(*ctx.rU_DataType()); return ParsedColumnDefinition(propertyName, dataType); } std::vector Transformer::transformPropertyDefinitions( - CypherParser::KU_PropertyDefinitionsContext& ctx) { + CypherParser::RU_PropertyDefinitionsContext& ctx) { std::vector definitions; - for (auto& definition : ctx.kU_PropertyDefinition()) { - auto columnDefinition = transformColumnDefinition(*definition->kU_ColumnDefinition()); + for (auto& definition : ctx.rU_PropertyDefinition()) { + auto columnDefinition = transformColumnDefinition(*definition->rU_ColumnDefinition()); std::unique_ptr defaultExpr = nullptr; - if (definition->kU_Default()) { - defaultExpr = transformExpression(*definition->kU_Default()->oC_Expression()); + if (definition->rU_Default()) { + defaultExpr = transformExpression(*definition->rU_Default()->oC_Expression()); } definitions.push_back( ParsedPropertyDefinition(std::move(columnDefinition), std::move(defaultExpr))); @@ -348,46 +348,46 @@ static std::string convertColumnDefinitionsToString( return result.substr(0, result.length() - 1); } -std::string Transformer::transformUnionType(CypherParser::KU_UnionTypeContext& ctx) { +std::string Transformer::transformUnionType(CypherParser::RU_UnionTypeContext& ctx) { return common::stringFormat("{}({})", ctx.UNION()->getText(), - convertColumnDefinitionsToString(transformColumnDefinitions(*ctx.kU_ColumnDefinitions()))); + convertColumnDefinitionsToString(transformColumnDefinitions(*ctx.rU_ColumnDefinitions()))); } -std::string Transformer::transformStructType(CypherParser::KU_StructTypeContext& ctx) { +std::string Transformer::transformStructType(CypherParser::RU_StructTypeContext& ctx) { return common::stringFormat("{}({})", ctx.STRUCT()->getText(), - convertColumnDefinitionsToString(transformColumnDefinitions(*ctx.kU_ColumnDefinitions()))); + convertColumnDefinitionsToString(transformColumnDefinitions(*ctx.rU_ColumnDefinitions()))); } -std::string Transformer::transformMapType(CypherParser::KU_MapTypeContext& ctx) { +std::string Transformer::transformMapType(CypherParser::RU_MapTypeContext& ctx) { return common::stringFormat("{}({},{})", ctx.MAP()->getText(), - transformDataType(*ctx.kU_DataType()[0]), transformDataType(*ctx.kU_DataType()[1])); + transformDataType(*ctx.rU_DataType()[0]), transformDataType(*ctx.rU_DataType()[1])); } -std::string Transformer::transformDecimalType(CypherParser::KU_DecimalTypeContext& ctx) { +std::string Transformer::transformDecimalType(CypherParser::RU_DecimalTypeContext& ctx) { return ctx.getText(); } -std::string Transformer::transformDataType(CypherParser::KU_DataTypeContext& ctx) { +std::string Transformer::transformDataType(CypherParser::RU_DataTypeContext& ctx) { if (ctx.oC_SymbolicName()) { return transformSymbolicName(*ctx.oC_SymbolicName()); - } else if (ctx.kU_UnionType()) { - return transformUnionType(*ctx.kU_UnionType()); - } else if (ctx.kU_StructType()) { - return transformStructType(*ctx.kU_StructType()); - } else if (ctx.kU_MapType()) { - return transformMapType(*ctx.kU_MapType()); - } else if (ctx.kU_DecimalType()) { - return transformDecimalType(*ctx.kU_DecimalType()); + } else if (ctx.rU_UnionType()) { + return transformUnionType(*ctx.rU_UnionType()); + } else if (ctx.rU_StructType()) { + return transformStructType(*ctx.rU_StructType()); + } else if (ctx.rU_MapType()) { + return transformMapType(*ctx.rU_MapType()); + } else if (ctx.rU_DecimalType()) { + return transformDecimalType(*ctx.rU_DecimalType()); } else { - return transformDataType(*ctx.kU_DataType()) + ctx.kU_ListIdentifiers()->getText(); + return transformDataType(*ctx.rU_DataType()) + ctx.rU_ListIdentifiers()->getText(); } } -std::string Transformer::transformPrimaryKey(CypherParser::KU_CreateNodeConstraintContext& ctx) { +std::string Transformer::transformPrimaryKey(CypherParser::RU_CreateNodeConstraintContext& ctx) { return transformPropertyKeyName(*ctx.oC_PropertyKeyName()); } -std::string Transformer::transformPrimaryKey(CypherParser::KU_ColumnDefinitionContext& ctx) { +std::string Transformer::transformPrimaryKey(CypherParser::RU_ColumnDefinitionContext& ctx) { return transformPropertyKeyName(*ctx.oC_PropertyKeyName()); } diff --git a/src/parser/transform/transform_detach_database.cpp b/src/parser/transform/transform_detach_database.cpp index 81c9ccac7f..ebb4806b3c 100644 --- a/src/parser/transform/transform_detach_database.cpp +++ b/src/parser/transform/transform_detach_database.cpp @@ -5,7 +5,7 @@ namespace ryu { namespace parser { std::unique_ptr Transformer::transformDetachDatabase( - CypherParser::KU_DetachDatabaseContext& ctx) { + CypherParser::RU_DetachDatabaseContext& ctx) { auto dbName = transformSchemaName(*ctx.oC_SchemaName()); return std::make_unique(std::move(dbName)); } diff --git a/src/parser/transform/transform_expression.cpp b/src/parser/transform/transform_expression.cpp index b90f7e9a2d..2d2b934540 100644 --- a/src/parser/transform/transform_expression.cpp +++ b/src/parser/transform/transform_expression.cpp @@ -88,15 +88,15 @@ std::unique_ptr Transformer::transformNotExpression( std::unique_ptr Transformer::transformComparisonExpression( CypherParser::OC_ComparisonExpressionContext& ctx) { - if (1 == ctx.kU_BitwiseOrOperatorExpression().size()) { - return transformBitwiseOrOperatorExpression(*ctx.kU_BitwiseOrOperatorExpression(0)); + if (1 == ctx.rU_BitwiseOrOperatorExpression().size()) { + return transformBitwiseOrOperatorExpression(*ctx.rU_BitwiseOrOperatorExpression(0)); } // Antlr parser throws error for conjunctive comparison. // Transformer should only handle the case of single comparison operator. - KU_ASSERT(ctx.kU_ComparisonOperator().size() == 1); - auto left = transformBitwiseOrOperatorExpression(*ctx.kU_BitwiseOrOperatorExpression(0)); - auto right = transformBitwiseOrOperatorExpression(*ctx.kU_BitwiseOrOperatorExpression(1)); - auto comparisonOperator = ctx.kU_ComparisonOperator()[0]->getText(); + RYU_ASSERT(ctx.rU_ComparisonOperator().size() == 1); + auto left = transformBitwiseOrOperatorExpression(*ctx.rU_BitwiseOrOperatorExpression(0)); + auto right = transformBitwiseOrOperatorExpression(*ctx.rU_BitwiseOrOperatorExpression(1)); + auto comparisonOperator = ctx.rU_ComparisonOperator()[0]->getText(); if (comparisonOperator == "=") { return std::make_unique(ExpressionType::EQUALS, std::move(left), std::move(right), ctx.getText()); @@ -113,17 +113,17 @@ std::unique_ptr Transformer::transformComparisonExpression( return std::make_unique(ExpressionType::LESS_THAN, std::move(left), std::move(right), ctx.getText()); } else { - KU_ASSERT(comparisonOperator == "<="); + RYU_ASSERT(comparisonOperator == "<="); return std::make_unique(ExpressionType::LESS_THAN_EQUALS, std::move(left), std::move(right), ctx.getText()); } } std::unique_ptr Transformer::transformBitwiseOrOperatorExpression( - CypherParser::KU_BitwiseOrOperatorExpressionContext& ctx) { + CypherParser::RU_BitwiseOrOperatorExpressionContext& ctx) { std::unique_ptr expression; - for (auto i = 0ul; i < ctx.kU_BitwiseAndOperatorExpression().size(); ++i) { - auto next = transformBitwiseAndOperatorExpression(*ctx.kU_BitwiseAndOperatorExpression(i)); + for (auto i = 0ul; i < ctx.rU_BitwiseAndOperatorExpression().size(); ++i) { + auto next = transformBitwiseAndOperatorExpression(*ctx.rU_BitwiseAndOperatorExpression(i)); if (!expression) { expression = std::move(next); } else { @@ -136,10 +136,10 @@ std::unique_ptr Transformer::transformBitwiseOrOperatorExpress } std::unique_ptr Transformer::transformBitwiseAndOperatorExpression( - CypherParser::KU_BitwiseAndOperatorExpressionContext& ctx) { + CypherParser::RU_BitwiseAndOperatorExpressionContext& ctx) { std::unique_ptr expression; - for (auto i = 0ul; i < ctx.kU_BitShiftOperatorExpression().size(); ++i) { - auto next = transformBitShiftOperatorExpression(*ctx.kU_BitShiftOperatorExpression(i)); + for (auto i = 0ul; i < ctx.rU_BitShiftOperatorExpression().size(); ++i) { + auto next = transformBitShiftOperatorExpression(*ctx.rU_BitShiftOperatorExpression(i)); if (!expression) { expression = std::move(next); } else { @@ -152,21 +152,21 @@ std::unique_ptr Transformer::transformBitwiseAndOperatorExpres } std::unique_ptr Transformer::transformBitShiftOperatorExpression( - CypherParser::KU_BitShiftOperatorExpressionContext& ctx) { + CypherParser::RU_BitShiftOperatorExpressionContext& ctx) { std::unique_ptr expression; for (auto i = 0ul; i < ctx.oC_AddOrSubtractExpression().size(); ++i) { auto next = transformAddOrSubtractExpression(*ctx.oC_AddOrSubtractExpression(i)); if (!expression) { expression = std::move(next); } else { - auto bitShiftOperator = ctx.kU_BitShiftOperator(i - 1)->getText(); + auto bitShiftOperator = ctx.rU_BitShiftOperator(i - 1)->getText(); auto rawName = expression->getRawName() + " " + bitShiftOperator + " " + next->getRawName(); if (bitShiftOperator == "<<") { expression = std::make_unique(BitShiftLeftFunction::name, std::move(expression), std::move(next), rawName); } else { - KU_ASSERT(bitShiftOperator == ">>"); + RYU_ASSERT(bitShiftOperator == ">>"); expression = std::make_unique(BitShiftRightFunction::name, std::move(expression), std::move(next), rawName); } @@ -184,7 +184,7 @@ std::unique_ptr Transformer::transformAddOrSubtractExpression( if (!expression) { expression = std::move(next); } else { - auto arithmeticOperator = ctx.kU_AddOrSubtractOperator(i - 1)->getText(); + auto arithmeticOperator = ctx.rU_AddOrSubtractOperator(i - 1)->getText(); auto rawName = expression->getRawName() + " " + arithmeticOperator + " " + next->getRawName(); expression = std::make_unique(arithmeticOperator, @@ -202,7 +202,7 @@ std::unique_ptr Transformer::transformMultiplyDivideModuloExpr if (!expression) { expression = std::move(next); } else { - auto arithmeticOperator = ctx.kU_MultiplyDivideModuloOperator(i - 1)->getText(); + auto arithmeticOperator = ctx.rU_MultiplyDivideModuloOperator(i - 1)->getText(); auto rawName = expression->getRawName() + " " + arithmeticOperator + " " + next->getRawName(); expression = std::make_unique(arithmeticOperator, @@ -296,7 +296,7 @@ std::unique_ptr Transformer::transformStringOperatorExpression return std::make_unique(ContainsFunction::name, std::move(propertyExpression), std::move(right), rawExpression); } else { - KU_ASSERT(ctx.oC_RegularExpression()); + RYU_ASSERT(ctx.oC_RegularExpression()); return std::make_unique(RegexpFullMatchFunction::name, std::move(propertyExpression), std::move(right), rawExpression); } @@ -343,7 +343,7 @@ std::unique_ptr Transformer::transformListOperatorExpression( auto listExtract = std::make_unique(ListExtractFunction::name, std::move(raw)); listExtract->addChild(std::move(child)); - KU_ASSERT(ctx.oC_Expression().size() == 1); + RYU_ASSERT(ctx.oC_Expression().size() == 1); listExtract->addChild(transformExpression(*ctx.oC_Expression()[0])); return listExtract; } @@ -352,7 +352,7 @@ std::unique_ptr Transformer::transformNullOperatorExpression( CypherParser::OC_NullOperatorExpressionContext& ctx, std::unique_ptr propertyExpression) { auto rawExpression = propertyExpression->getRawName() + " " + ctx.getText(); - KU_ASSERT(ctx.IS() && ctx.NULL_()); + RYU_ASSERT(ctx.IS() && ctx.NULL_()); return ctx.NOT() ? std::make_unique(ExpressionType::IS_NOT_NULL, std::move(propertyExpression), rawExpression) : std::make_unique(ExpressionType::IS_NULL, @@ -392,7 +392,7 @@ std::unique_ptr Transformer::transformAtom(CypherParser::OC_At } else if (ctx.oC_Quantifier()) { return transformOcQuantifier(*ctx.oC_Quantifier()); } else { - KU_ASSERT(ctx.oC_Variable()); + RYU_ASSERT(ctx.oC_Variable()); return std::make_unique(transformVariable(*ctx.oC_Variable()), ctx.getText()); } @@ -410,10 +410,10 @@ std::unique_ptr Transformer::transformLiteral( ctx.getText()); } else if (ctx.NULL_()) { return std::make_unique(Value::createNullValue(), ctx.getText()); - } else if (ctx.kU_StructLiteral()) { - return transformStructLiteral(*ctx.kU_StructLiteral()); + } else if (ctx.rU_StructLiteral()) { + return transformStructLiteral(*ctx.rU_StructLiteral()); } else { - KU_ASSERT(ctx.oC_ListLiteral()); + RYU_ASSERT(ctx.oC_ListLiteral()); return transformListLiteral(*ctx.oC_ListLiteral()); } } @@ -425,7 +425,7 @@ std::unique_ptr Transformer::transformBooleanLiteral( } else if (ctx.FALSE()) { return std::make_unique(Value(false), ctx.getText()); } - KU_UNREACHABLE; + RYU_UNREACHABLE; } std::unique_ptr Transformer::transformListLiteral( @@ -436,7 +436,7 @@ std::unique_ptr Transformer::transformListLiteral( return listCreation; } listCreation->addChild(transformExpression(*ctx.oC_Expression())); - for (auto& listEntry : ctx.kU_ListEntry()) { + for (auto& listEntry : ctx.rU_ListEntry()) { if (listEntry->oC_Expression() == nullptr) { auto nullValue = Value::createNullValue(); listCreation->addChild( @@ -449,10 +449,10 @@ std::unique_ptr Transformer::transformListLiteral( } std::unique_ptr Transformer::transformStructLiteral( - CypherParser::KU_StructLiteralContext& ctx) { + CypherParser::RU_StructLiteralContext& ctx) { auto structPack = std::make_unique(StructPackFunctions::name, ctx.getText()); - for (auto& structField : ctx.kU_StructField()) { + for (auto& structField : ctx.rU_StructField()) { auto structExpr = transformExpression(*structField->oC_Expression()); std::string paramName; if (structField->oC_SymbolicName()) { @@ -493,15 +493,15 @@ std::unique_ptr Transformer::transformFunctionInvocation( auto expression = std::make_unique(functionName, ctx.getText(), ctx.DISTINCT() != nullptr); if (ctx.CAST()) { - for (auto& functionParameter : ctx.kU_FunctionParameter()) { + for (auto& functionParameter : ctx.rU_FunctionParameter()) { expression->addChild(transformFunctionParameterExpression(*functionParameter)); } - if (ctx.kU_DataType()) { + if (ctx.rU_DataType()) { expression->addChild(std::make_unique( - common::Value(transformDataType(*ctx.kU_DataType())))); + common::Value(transformDataType(*ctx.rU_DataType())))); } } else { - for (auto& functionParameter : ctx.kU_FunctionParameter()) { + for (auto& functionParameter : ctx.rU_FunctionParameter()) { auto parsedFunctionParameter = transformFunctionParameterExpression(*functionParameter); if (functionParameter->oC_SymbolicName()) { // Optional parameter @@ -521,7 +521,7 @@ std::string Transformer::transformFunctionName(CypherParser::OC_FunctionNameCont } std::vector Transformer::transformLambdaVariables( - CypherParser::KU_LambdaVarsContext& ctx) { + CypherParser::RU_LambdaVarsContext& ctx) { std::vector lambdaVariables; lambdaVariables.reserve(ctx.oC_SymbolicName().size()); for (auto& var : ctx.oC_SymbolicName()) { @@ -531,17 +531,17 @@ std::vector Transformer::transformLambdaVariables( } std::unique_ptr Transformer::transformLambdaParameter( - CypherParser::KU_LambdaParameterContext& ctx) { - auto vars = transformLambdaVariables(*ctx.kU_LambdaVars()); + CypherParser::RU_LambdaParameterContext& ctx) { + auto vars = transformLambdaVariables(*ctx.rU_LambdaVars()); auto lambdaOperation = transformExpression(*ctx.oC_Expression()); return std::make_unique(std::move(vars), std::move(lambdaOperation), ctx.getText()); } std::unique_ptr Transformer::transformFunctionParameterExpression( - CypherParser::KU_FunctionParameterContext& ctx) { - if (ctx.kU_LambdaParameter()) { - return transformLambdaParameter(*ctx.kU_LambdaParameter()); + CypherParser::RU_FunctionParameterContext& ctx) { + if (ctx.rU_LambdaParameter()) { + return transformLambdaParameter(*ctx.rU_LambdaParameter()); } else { auto expression = transformExpression(*ctx.oC_Expression()); if (ctx.oC_SymbolicName()) { @@ -570,8 +570,8 @@ std::unique_ptr Transformer::transformExistCountSubquery( if (ctx.oC_Where()) { subquery->setWhereClause(transformWhere(*ctx.oC_Where())); } - if (ctx.kU_Hint()) { - subquery->setHint(transformJoinHint(*ctx.kU_Hint()->kU_JoinNode())); + if (ctx.rU_Hint()) { + subquery->setHint(transformJoinHint(*ctx.rU_Hint()->rU_JoinNode())); } return subquery; } @@ -621,7 +621,7 @@ std::unique_ptr Transformer::transformCaseExpression( if (ctx.oC_Expression().size() == 1) { elseExpression = transformExpression(*ctx.oC_Expression(0)); } else { - KU_ASSERT(ctx.oC_Expression().size() == 2); + RYU_ASSERT(ctx.oC_Expression().size() == 2); caseExpression = transformExpression(*ctx.oC_Expression(0)); elseExpression = transformExpression(*ctx.oC_Expression(1)); } @@ -651,7 +651,7 @@ std::unique_ptr Transformer::transformNumberLiteral( if (ctx.oC_IntegerLiteral()) { return transformIntegerLiteral(*ctx.oC_IntegerLiteral(), negative); } else { - KU_ASSERT(ctx.oC_DoubleLiteral()); + RYU_ASSERT(ctx.oC_DoubleLiteral()); return transformDoubleLiteral(*ctx.oC_DoubleLiteral(), negative); } } diff --git a/src/parser/transform/transform_extension.cpp b/src/parser/transform/transform_extension.cpp index c903fad7eb..3ef4f81257 100644 --- a/src/parser/transform/transform_extension.cpp +++ b/src/parser/transform/transform_extension.cpp @@ -8,31 +8,31 @@ using namespace ryu::extension; namespace ryu { namespace parser { -std::unique_ptr Transformer::transformExtension(CypherParser::KU_ExtensionContext& ctx) { - if (ctx.kU_InstallExtension()) { +std::unique_ptr Transformer::transformExtension(CypherParser::RU_ExtensionContext& ctx) { + if (ctx.rU_InstallExtension()) { auto extensionRepo = - ctx.kU_InstallExtension()->StringLiteral() ? - transformStringLiteral(*ctx.kU_InstallExtension()->StringLiteral()) : + ctx.rU_InstallExtension()->StringLiteral() ? + transformStringLiteral(*ctx.rU_InstallExtension()->StringLiteral()) : ExtensionUtils::OFFICIAL_EXTENSION_REPO; auto installExtensionAuxInfo = std::make_unique( - std::move(extensionRepo), transformVariable(*ctx.kU_InstallExtension()->oC_Variable()), - ctx.kU_InstallExtension()->FORCE()); + std::move(extensionRepo), transformVariable(*ctx.rU_InstallExtension()->oC_Variable()), + ctx.rU_InstallExtension()->FORCE()); return std::make_unique(std::move(installExtensionAuxInfo)); - } else if (ctx.kU_UpdateExtension()) { + } else if (ctx.rU_UpdateExtension()) { // Update extension is a syntax sugar for force install extension. auto installExtensionAuxInfo = std::make_unique( ExtensionUtils::OFFICIAL_EXTENSION_REPO, - transformVariable(*ctx.kU_UpdateExtension()->oC_Variable()), true /* forceInstall */); + transformVariable(*ctx.rU_UpdateExtension()->oC_Variable()), true /* forceInstall */); return std::make_unique(std::move(installExtensionAuxInfo)); - } else if (ctx.kU_UninstallExtension()) { - auto path = transformVariable(*ctx.kU_UninstallExtension()->oC_Variable()); + } else if (ctx.rU_UninstallExtension()) { + auto path = transformVariable(*ctx.rU_UninstallExtension()->oC_Variable()); return std::make_unique( std::make_unique(ExtensionAction::UNINSTALL, std::move(path))); } else { - auto path = ctx.kU_LoadExtension()->StringLiteral() ? - transformStringLiteral(*ctx.kU_LoadExtension()->StringLiteral()) : - transformVariable(*ctx.kU_LoadExtension()->oC_Variable()); + auto path = ctx.rU_LoadExtension()->StringLiteral() ? + transformStringLiteral(*ctx.rU_LoadExtension()->StringLiteral()) : + transformVariable(*ctx.rU_LoadExtension()->oC_Variable()); auto installExtensionAuxInfo = std::make_unique(ExtensionAction::LOAD, std::move(path)); return std::make_unique(std::move(installExtensionAuxInfo)); diff --git a/src/parser/transform/transform_graph_pattern.cpp b/src/parser/transform/transform_graph_pattern.cpp index cbf25ed1a3..5c1dbef5bc 100644 --- a/src/parser/transform/transform_graph_pattern.cpp +++ b/src/parser/transform/transform_graph_pattern.cpp @@ -53,8 +53,8 @@ NodePattern Transformer::transformNodePattern(CypherParser::OC_NodePatternContex nodeLabels = transformNodeLabels(*ctx.oC_NodeLabels()); } auto properties = std::vector>>{}; - if (ctx.kU_Properties()) { - properties = transformProperties(*ctx.kU_Properties()); + if (ctx.rU_Properties()) { + properties = transformProperties(*ctx.rU_Properties()); } return NodePattern(std::move(variable), std::move(nodeLabels), std::move(properties)); } @@ -79,8 +79,8 @@ RelPattern Transformer::transformRelationshipPattern( if (relDetail->oC_RelationshipTypes()) { relTypes = transformRelTypes(*relDetail->oC_RelationshipTypes()); } - if (relDetail->kU_Properties()) { - properties = transformProperties(*relDetail->kU_Properties()); + if (relDetail->rU_Properties()) { + properties = transformProperties(*relDetail->rU_Properties()); } } // Parse direction @@ -96,10 +96,10 @@ RelPattern Transformer::transformRelationshipPattern( auto relType = QueryRelType::NON_RECURSIVE; auto recursiveInfo = RecursiveRelPatternInfo(); - if (relDetail && relDetail->kU_RecursiveDetail()) { - auto recursiveDetail = relDetail->kU_RecursiveDetail(); + if (relDetail && relDetail->rU_RecursiveDetail()) { + auto recursiveDetail = relDetail->rU_RecursiveDetail(); // Parse recursive type - auto recursiveType = recursiveDetail->kU_RecursiveType(); + auto recursiveType = recursiveDetail->rU_RecursiveType(); if (recursiveType) { if (recursiveType->ALL()) { if (recursiveType->WSHORTEST()) { @@ -113,11 +113,11 @@ RelPattern Transformer::transformRelationshipPattern( relType = QueryRelType::WEIGHTED_SHORTEST; recursiveInfo.weightPropertyName = transformPropertyKeyName(*recursiveType->oC_PropertyKeyName()); - } else if (recursiveDetail->kU_RecursiveType()->SHORTEST()) { + } else if (recursiveDetail->rU_RecursiveType()->SHORTEST()) { relType = QueryRelType::SHORTEST; - } else if (recursiveDetail->kU_RecursiveType()->TRAIL()) { + } else if (recursiveDetail->rU_RecursiveType()->TRAIL()) { relType = QueryRelType::VARIABLE_LENGTH_TRAIL; - } else if (recursiveDetail->kU_RecursiveType()->ACYCLIC()) { + } else if (recursiveDetail->rU_RecursiveType()->ACYCLIC()) { relType = QueryRelType::VARIABLE_LENGTH_ACYCLIC; } else { relType = QueryRelType::VARIABLE_LENGTH_WALK; @@ -144,23 +144,23 @@ RelPattern Transformer::transformRelationshipPattern( recursiveInfo.lowerBound = lowerBound; recursiveInfo.upperBound = upperBound; // Parse recursive comprehension - auto comprehension = recursiveDetail->kU_RecursiveComprehension(); + auto comprehension = recursiveDetail->rU_RecursiveComprehension(); if (comprehension) { recursiveInfo.relName = transformVariable(*comprehension->oC_Variable(0)); recursiveInfo.nodeName = transformVariable(*comprehension->oC_Variable(1)); if (comprehension->oC_Where()) { recursiveInfo.whereExpression = transformWhere(*comprehension->oC_Where()); } - if (!comprehension->kU_RecursiveProjectionItems().empty()) { + if (!comprehension->rU_RecursiveProjectionItems().empty()) { recursiveInfo.hasProjection = true; - KU_ASSERT(comprehension->kU_RecursiveProjectionItems().size() == 2); + RYU_ASSERT(comprehension->rU_RecursiveProjectionItems().size() == 2); auto relProjectionList = - comprehension->kU_RecursiveProjectionItems(0)->oC_ProjectionItems(); + comprehension->rU_RecursiveProjectionItems(0)->oC_ProjectionItems(); if (relProjectionList) { recursiveInfo.relProjectionList = transformProjectionItems(*relProjectionList); } auto nodeProjectionList = - comprehension->kU_RecursiveProjectionItems(1)->oC_ProjectionItems(); + comprehension->rU_RecursiveProjectionItems(1)->oC_ProjectionItems(); if (nodeProjectionList) { recursiveInfo.nodeProjectionList = transformProjectionItems(*nodeProjectionList); @@ -173,9 +173,9 @@ RelPattern Transformer::transformRelationshipPattern( } std::vector Transformer::transformProperties( - CypherParser::KU_PropertiesContext& ctx) { + CypherParser::RU_PropertiesContext& ctx) { std::vector>> result; - KU_ASSERT(ctx.oC_PropertyKeyName().size() == ctx.oC_Expression().size()); + RYU_ASSERT(ctx.oC_PropertyKeyName().size() == ctx.oC_Expression().size()); for (auto i = 0u; i < ctx.oC_PropertyKeyName().size(); ++i) { auto propertyKeyName = transformPropertyKeyName(*ctx.oC_PropertyKeyName(i)); auto expression = transformExpression(*ctx.oC_Expression(i)); diff --git a/src/parser/transform/transform_macro.cpp b/src/parser/transform/transform_macro.cpp index 598fa8e00b..c8fcaeb623 100644 --- a/src/parser/transform/transform_macro.cpp +++ b/src/parser/transform/transform_macro.cpp @@ -5,7 +5,7 @@ namespace ryu { namespace parser { std::vector Transformer::transformPositionalArgs( - CypherParser::KU_PositionalArgsContext& ctx) { + CypherParser::RU_PositionalArgsContext& ctx) { std::vector positionalArgs; for (auto& positionalArg : ctx.oC_SymbolicName()) { positionalArgs.push_back(transformSymbolicName(*positionalArg)); @@ -14,15 +14,15 @@ std::vector Transformer::transformPositionalArgs( } std::unique_ptr Transformer::transformCreateMacro( - CypherParser::KU_CreateMacroContext& ctx) { + CypherParser::RU_CreateMacroContext& ctx) { auto macroName = transformFunctionName(*ctx.oC_FunctionName()); auto macroExpression = transformExpression(*ctx.oC_Expression()); std::vector positionalArgs; - if (ctx.kU_PositionalArgs()) { - positionalArgs = transformPositionalArgs(*ctx.kU_PositionalArgs()); + if (ctx.rU_PositionalArgs()) { + positionalArgs = transformPositionalArgs(*ctx.rU_PositionalArgs()); } default_macro_args defaultArgs; - for (auto& defaultArg : ctx.kU_DefaultArg()) { + for (auto& defaultArg : ctx.rU_DefaultArg()) { defaultArgs.emplace_back(transformSymbolicName(*defaultArg->oC_SymbolicName()), transformLiteral(*defaultArg->oC_Literal())); } diff --git a/src/parser/transform/transform_port_db.cpp b/src/parser/transform/transform_port_db.cpp index 343f332ff9..ebb183ed34 100644 --- a/src/parser/transform/transform_port_db.cpp +++ b/src/parser/transform/transform_port_db.cpp @@ -7,17 +7,17 @@ namespace ryu { namespace parser { std::unique_ptr Transformer::transformExportDatabase( - CypherParser::KU_ExportDatabaseContext& ctx) { + CypherParser::RU_ExportDatabaseContext& ctx) { std::string filePath = transformStringLiteral(*ctx.StringLiteral()); auto exportDB = std::make_unique(std::move(filePath)); - if (ctx.kU_Options()) { - exportDB->setParsingOption(transformOptions(*ctx.kU_Options())); + if (ctx.rU_Options()) { + exportDB->setParsingOption(transformOptions(*ctx.rU_Options())); } return exportDB; } std::unique_ptr Transformer::transformImportDatabase( - CypherParser::KU_ImportDatabaseContext& ctx) { + CypherParser::RU_ImportDatabaseContext& ctx) { std::string filePath = transformStringLiteral(*ctx.StringLiteral()); return std::make_unique(std::move(filePath)); } diff --git a/src/parser/transform/transform_query.cpp b/src/parser/transform/transform_query.cpp index 7f04fa9dba..d31f80f19e 100644 --- a/src/parser/transform/transform_query.cpp +++ b/src/parser/transform/transform_query.cpp @@ -24,7 +24,7 @@ SingleQuery Transformer::transformSingleQuery(CypherParser::OC_SingleQueryContex transformSinglePartQuery(*ctx.oC_MultiPartQuery()->oC_SinglePartQuery()) : transformSinglePartQuery(*ctx.oC_SinglePartQuery()); if (ctx.oC_MultiPartQuery()) { - for (auto queryPart : ctx.oC_MultiPartQuery()->kU_QueryPart()) { + for (auto queryPart : ctx.oC_MultiPartQuery()->rU_QueryPart()) { singleQuery.addQueryPart(transformQueryPart(*queryPart)); } } @@ -45,7 +45,7 @@ SingleQuery Transformer::transformSinglePartQuery(CypherParser::OC_SinglePartQue return singleQuery; } -QueryPart Transformer::transformQueryPart(CypherParser::KU_QueryPartContext& ctx) { +QueryPart Transformer::transformQueryPart(CypherParser::RU_QueryPartContext& ctx) { auto queryPart = QueryPart(transformWith(*ctx.oC_With())); for (auto& readingClause : ctx.oC_ReadingClause()) { queryPart.addReadingClause(transformReadingClause(*readingClause)); diff --git a/src/parser/transform/transform_reading_clause.cpp b/src/parser/transform/transform_reading_clause.cpp index 61376c5bd8..5d748dc837 100644 --- a/src/parser/transform/transform_reading_clause.cpp +++ b/src/parser/transform/transform_reading_clause.cpp @@ -16,12 +16,12 @@ std::unique_ptr Transformer::transformReadingClause( return transformMatch(*ctx.oC_Match()); } else if (ctx.oC_Unwind()) { return transformUnwind(*ctx.oC_Unwind()); - } else if (ctx.kU_InQueryCall()) { - return transformInQueryCall(*ctx.kU_InQueryCall()); - } else if (ctx.kU_LoadFrom()) { - return transformLoadFrom(*ctx.kU_LoadFrom()); + } else if (ctx.rU_InQueryCall()) { + return transformInQueryCall(*ctx.rU_InQueryCall()); + } else if (ctx.rU_LoadFrom()) { + return transformLoadFrom(*ctx.rU_LoadFrom()); } - KU_UNREACHABLE; + RYU_UNREACHABLE; } std::unique_ptr Transformer::transformMatch(CypherParser::OC_MatchContext& ctx) { @@ -32,17 +32,17 @@ std::unique_ptr Transformer::transformMatch(CypherParser::OC_Matc if (ctx.oC_Where()) { matchClause->setWherePredicate(transformWhere(*ctx.oC_Where())); } - if (ctx.kU_Hint()) { - matchClause->setHint(transformJoinHint(*ctx.kU_Hint()->kU_JoinNode())); + if (ctx.rU_Hint()) { + matchClause->setHint(transformJoinHint(*ctx.rU_Hint()->rU_JoinNode())); } return matchClause; } std::shared_ptr Transformer::transformJoinHint( - CypherParser::KU_JoinNodeContext& ctx) { + CypherParser::RU_JoinNodeContext& ctx) { if (!ctx.MULTI_JOIN().empty()) { auto joinNode = std::make_shared(); - joinNode->addChild(transformJoinHint(*ctx.kU_JoinNode(0))); + joinNode->addChild(transformJoinHint(*ctx.rU_JoinNode(0))); for (auto& schemaNameCtx : ctx.oC_SchemaName()) { joinNode->addChild(std::make_shared(transformSchemaName(*schemaNameCtx))); } @@ -51,13 +51,13 @@ std::shared_ptr Transformer::transformJoinHint( if (!ctx.oC_SchemaName().empty()) { return std::make_shared(transformSchemaName(*ctx.oC_SchemaName(0))); } - if (ctx.kU_JoinNode().size() == 1) { - return transformJoinHint(*ctx.kU_JoinNode(0)); + if (ctx.rU_JoinNode().size() == 1) { + return transformJoinHint(*ctx.rU_JoinNode(0)); } - KU_ASSERT(ctx.kU_JoinNode().size() == 2); + RYU_ASSERT(ctx.rU_JoinNode().size() == 2); auto joinNode = std::make_shared(); - joinNode->addChild(transformJoinHint(*ctx.kU_JoinNode(0))); - joinNode->addChild(transformJoinHint(*ctx.kU_JoinNode(1))); + joinNode->addChild(transformJoinHint(*ctx.rU_JoinNode(0))); + joinNode->addChild(transformJoinHint(*ctx.rU_JoinNode(1))); return joinNode; } @@ -83,7 +83,7 @@ std::vector Transformer::transformYieldVariables( } std::unique_ptr Transformer::transformInQueryCall( - CypherParser::KU_InQueryCallContext& ctx) { + CypherParser::RU_InQueryCallContext& ctx) { auto functionExpression = Transformer::transformFunctionInvocation(*ctx.oC_FunctionInvocation()); std::vector yieldVariables; @@ -99,14 +99,14 @@ std::unique_ptr Transformer::transformInQueryCall( } std::unique_ptr Transformer::transformLoadFrom( - CypherParser::KU_LoadFromContext& ctx) { - auto source = transformScanSource(*ctx.kU_ScanSource()); + CypherParser::RU_LoadFromContext& ctx) { + auto source = transformScanSource(*ctx.rU_ScanSource()); auto loadFrom = std::make_unique(std::move(source)); - if (ctx.kU_ColumnDefinitions()) { - loadFrom->setPropertyDefinitions(transformColumnDefinitions(*ctx.kU_ColumnDefinitions())); + if (ctx.rU_ColumnDefinitions()) { + loadFrom->setPropertyDefinitions(transformColumnDefinitions(*ctx.rU_ColumnDefinitions())); } - if (ctx.kU_Options()) { - loadFrom->setParingOptions(transformOptions(*ctx.kU_Options())); + if (ctx.rU_Options()) { + loadFrom->setParingOptions(transformOptions(*ctx.rU_Options())); } if (ctx.oC_Where()) { loadFrom->setWherePredicate(transformWhere(*ctx.oC_Where())); diff --git a/src/parser/transform/transform_standalone_call.cpp b/src/parser/transform/transform_standalone_call.cpp index d17ff6af41..654247e4b6 100644 --- a/src/parser/transform/transform_standalone_call.cpp +++ b/src/parser/transform/transform_standalone_call.cpp @@ -6,7 +6,7 @@ namespace ryu { namespace parser { std::unique_ptr Transformer::transformStandaloneCall( - CypherParser::KU_StandaloneCallContext& ctx) { + CypherParser::RU_StandaloneCallContext& ctx) { if (ctx.oC_FunctionInvocation()) { return std::make_unique( transformFunctionInvocation(*ctx.oC_FunctionInvocation())); diff --git a/src/parser/transform/transform_transaction.cpp b/src/parser/transform/transform_transaction.cpp index 84f7c07180..429e0301af 100644 --- a/src/parser/transform/transform_transaction.cpp +++ b/src/parser/transform/transform_transaction.cpp @@ -9,7 +9,7 @@ namespace ryu { namespace parser { std::unique_ptr Transformer::transformTransaction( - CypherParser::KU_TransactionContext& ctx) { + CypherParser::RU_TransactionContext& ctx) { if (ctx.TRANSACTION()) { if (ctx.READ()) { return std::make_unique(TransactionAction::BEGIN_READ); @@ -25,7 +25,7 @@ std::unique_ptr Transformer::transformTransaction( if (ctx.CHECKPOINT()) { return std::make_unique(TransactionAction::CHECKPOINT); } - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // namespace parser diff --git a/src/parser/transform/transform_updating_clause.cpp b/src/parser/transform/transform_updating_clause.cpp index e9681fcc80..d94b906422 100644 --- a/src/parser/transform/transform_updating_clause.cpp +++ b/src/parser/transform/transform_updating_clause.cpp @@ -17,7 +17,7 @@ std::unique_ptr Transformer::transformUpdatingClause( } else if (ctx.oC_Set()) { return transformSet(*ctx.oC_Set()); } else { - KU_ASSERT(ctx.oC_Delete()); + RYU_ASSERT(ctx.oC_Delete()); return transformDelete(*ctx.oC_Delete()); } } @@ -44,12 +44,12 @@ std::unique_ptr Transformer::transformMerge(CypherParser::OC_Mer std::unique_ptr Transformer::transformSet(CypherParser::OC_SetContext& ctx) { auto setClause = std::make_unique(); - if (ctx.kU_Properties()) { + if (ctx.rU_Properties()) { auto child = transformAtom(*ctx.oC_Atom()); - for (auto i = 0u; i < ctx.kU_Properties()->oC_PropertyKeyName().size(); ++i) { + for (auto i = 0u; i < ctx.rU_Properties()->oC_PropertyKeyName().size(); ++i) { auto propertyKeyName = createPropertyExpression( - *ctx.kU_Properties()->oC_PropertyKeyName(i), child->copy()); - auto expression = transformExpression(*ctx.kU_Properties()->oC_Expression(i)); + *ctx.rU_Properties()->oC_PropertyKeyName(i), child->copy()); + auto expression = transformExpression(*ctx.rU_Properties()->oC_Expression(i)); setClause->addSetItem(make_pair(std::move(propertyKeyName), std::move(expression))); } } else { diff --git a/src/parser/transform/transform_use_database.cpp b/src/parser/transform/transform_use_database.cpp index 5532f27126..6b7d113301 100644 --- a/src/parser/transform/transform_use_database.cpp +++ b/src/parser/transform/transform_use_database.cpp @@ -5,7 +5,7 @@ namespace ryu { namespace parser { std::unique_ptr Transformer::transformUseDatabase( - CypherParser::KU_UseDatabaseContext& ctx) { + CypherParser::RU_UseDatabaseContext& ctx) { auto dbName = transformSchemaName(*ctx.oC_SchemaName()); return std::make_unique(std::move(dbName)); } diff --git a/src/parser/transformer.cpp b/src/parser/transformer.cpp index 7c054eb8e0..a6969da89a 100644 --- a/src/parser/transformer.cpp +++ b/src/parser/transformer.cpp @@ -36,50 +36,50 @@ std::vector> Transformer::transform() { std::unique_ptr Transformer::transformStatement(CypherParser::OC_StatementContext& ctx) { if (ctx.oC_Query()) { return transformQuery(*ctx.oC_Query()); - } else if (ctx.kU_CreateNodeTable()) { - return transformCreateNodeTable(*ctx.kU_CreateNodeTable()); - } else if (ctx.kU_CreateRelTable()) { - return transformCreateRelGroup(*ctx.kU_CreateRelTable()); - } else if (ctx.kU_CreateSequence()) { - return transformCreateSequence(*ctx.kU_CreateSequence()); - } else if (ctx.kU_CreateType()) { - return transformCreateType(*ctx.kU_CreateType()); - } else if (ctx.kU_CreateUser()) { - return transformExtensionStatement(ctx.kU_CreateUser()); - } else if (ctx.kU_CreateRole()) { - return transformExtensionStatement(ctx.kU_CreateRole()); - } else if (ctx.kU_Drop()) { - return transformDrop(*ctx.kU_Drop()); - } else if (ctx.kU_AlterTable()) { - return transformAlterTable(*ctx.kU_AlterTable()); - } else if (ctx.kU_CopyFromByColumn()) { - return transformCopyFromByColumn(*ctx.kU_CopyFromByColumn()); - } else if (ctx.kU_CopyFrom()) { - return transformCopyFrom(*ctx.kU_CopyFrom()); - } else if (ctx.kU_CopyTO()) { - return transformCopyTo(*ctx.kU_CopyTO()); - } else if (ctx.kU_StandaloneCall()) { - return transformStandaloneCall(*ctx.kU_StandaloneCall()); - } else if (ctx.kU_CreateMacro()) { - return transformCreateMacro(*ctx.kU_CreateMacro()); - } else if (ctx.kU_CommentOn()) { - return transformCommentOn(*ctx.kU_CommentOn()); - } else if (ctx.kU_Transaction()) { - return transformTransaction(*ctx.kU_Transaction()); - } else if (ctx.kU_Extension()) { - return transformExtension(*ctx.kU_Extension()); - } else if (ctx.kU_ExportDatabase()) { - return transformExportDatabase(*ctx.kU_ExportDatabase()); - } else if (ctx.kU_ImportDatabase()) { - return transformImportDatabase(*ctx.kU_ImportDatabase()); - } else if (ctx.kU_AttachDatabase()) { - return transformAttachDatabase(*ctx.kU_AttachDatabase()); - } else if (ctx.kU_DetachDatabase()) { - return transformDetachDatabase(*ctx.kU_DetachDatabase()); - } else if (ctx.kU_UseDatabase()) { - return transformUseDatabase(*ctx.kU_UseDatabase()); + } else if (ctx.rU_CreateNodeTable()) { + return transformCreateNodeTable(*ctx.rU_CreateNodeTable()); + } else if (ctx.rU_CreateRelTable()) { + return transformCreateRelGroup(*ctx.rU_CreateRelTable()); + } else if (ctx.rU_CreateSequence()) { + return transformCreateSequence(*ctx.rU_CreateSequence()); + } else if (ctx.rU_CreateType()) { + return transformCreateType(*ctx.rU_CreateType()); + } else if (ctx.rU_CreateUser()) { + return transformExtensionStatement(ctx.rU_CreateUser()); + } else if (ctx.rU_CreateRole()) { + return transformExtensionStatement(ctx.rU_CreateRole()); + } else if (ctx.rU_Drop()) { + return transformDrop(*ctx.rU_Drop()); + } else if (ctx.rU_AlterTable()) { + return transformAlterTable(*ctx.rU_AlterTable()); + } else if (ctx.rU_CopyFromByColumn()) { + return transformCopyFromByColumn(*ctx.rU_CopyFromByColumn()); + } else if (ctx.rU_CopyFrom()) { + return transformCopyFrom(*ctx.rU_CopyFrom()); + } else if (ctx.rU_CopyTO()) { + return transformCopyTo(*ctx.rU_CopyTO()); + } else if (ctx.rU_StandaloneCall()) { + return transformStandaloneCall(*ctx.rU_StandaloneCall()); + } else if (ctx.rU_CreateMacro()) { + return transformCreateMacro(*ctx.rU_CreateMacro()); + } else if (ctx.rU_CommentOn()) { + return transformCommentOn(*ctx.rU_CommentOn()); + } else if (ctx.rU_Transaction()) { + return transformTransaction(*ctx.rU_Transaction()); + } else if (ctx.rU_Extension()) { + return transformExtension(*ctx.rU_Extension()); + } else if (ctx.rU_ExportDatabase()) { + return transformExportDatabase(*ctx.rU_ExportDatabase()); + } else if (ctx.rU_ImportDatabase()) { + return transformImportDatabase(*ctx.rU_ImportDatabase()); + } else if (ctx.rU_AttachDatabase()) { + return transformAttachDatabase(*ctx.rU_AttachDatabase()); + } else if (ctx.rU_DetachDatabase()) { + return transformDetachDatabase(*ctx.rU_DetachDatabase()); + } else if (ctx.rU_UseDatabase()) { + return transformUseDatabase(*ctx.rU_UseDatabase()); } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -142,13 +142,13 @@ std::string Transformer::transformStringLiteral(antlr4::tree::TerminalNode& stri if (next == 'u' || next == 'U') { int hexDigits = (next == 'u') ? 4 : 8; if (i + 1 + hexDigits > content.length()) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } std::string hexStr = content.substr(i + 2, hexDigits); char* endPtr = nullptr; long hexValue = std::strtol(hexStr.c_str(), &endPtr, 16); if (endPtr != hexStr.c_str() + hexDigits) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } // Convert Unicode code point to UTF-8 if (hexValue <= 0x7F) { @@ -166,13 +166,13 @@ std::string Transformer::transformStringLiteral(antlr4::tree::TerminalNode& stri result += static_cast(0x80 | ((hexValue >> 6) & 0x3F)); result += static_cast(0x80 | (hexValue & 0x3F)); } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } i += 1 + hexDigits; } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } else { result += content[i]; @@ -192,7 +192,7 @@ std::string Transformer::transformSymbolicName(CypherParser::OC_SymbolicNameCont // it such that we don't store the symbol with escape character. return escapedSymbolName.substr(1, escapedSymbolName.size() - 2); } else { - KU_ASSERT(ctx.HexLetter() || ctx.UnescapedSymbolicName() || ctx.kU_NonReservedKeywords()); + RYU_ASSERT(ctx.HexLetter() || ctx.UnescapedSymbolicName() || ctx.rU_NonReservedKeywords()); return ctx.getText(); } } diff --git a/src/planner/join_order/cardinality_estimator.cpp b/src/planner/join_order/cardinality_estimator.cpp index 567272971b..0f2cec0202 100644 --- a/src/planner/join_order/cardinality_estimator.cpp +++ b/src/planner/join_order/cardinality_estimator.cpp @@ -53,13 +53,13 @@ void CardinalityEstimator::init(const NodeExpression& node) { } void CardinalityEstimator::rectifyCardinality(const Expression& nodeID, cardinality_t card) { - KU_ASSERT(nodeIDName2dom.contains(nodeID.getUniqueName())); + RYU_ASSERT(nodeIDName2dom.contains(nodeID.getUniqueName())); auto newCard = std::min(nodeIDName2dom.at(nodeID.getUniqueName()), card); nodeIDName2dom[nodeID.getUniqueName()] = newCard; } cardinality_t CardinalityEstimator::getNodeIDDom(const std::string& nodeIDName) const { - KU_ASSERT(nodeIDName2dom.contains(nodeIDName)); + RYU_ASSERT(nodeIDName2dom.contains(nodeIDName)); return nodeIDName2dom.at(nodeIDName); } @@ -153,7 +153,7 @@ static bool isSingleLabelledProperty(const Expression& expression) { static std::optional getTableStatsIfPossible(main::ClientContext* context, const Expression& predicate, const std::unordered_map& nodeTableStats) { - KU_ASSERT(predicate.getNumChildren() >= 1); + RYU_ASSERT(predicate.getNumChildren() >= 1); if (isSingleLabelledProperty(*predicate.getChild(0))) { auto& propertyExpr = predicate.getChild(0)->cast(); auto tableID = propertyExpr.getSingleTableID(); @@ -195,7 +195,7 @@ uint64_t CardinalityEstimator::getNumNodes(const Transaction*, const std::vector& tableIDs) const { cardinality_t numNodes = 0u; for (auto& tableID : tableIDs) { - KU_ASSERT(nodeTableStats.contains(tableID)); + RYU_ASSERT(nodeTableStats.contains(tableID)); numNodes += nodeTableStats.at(tableID).getTableCard(); } return atLeastOne(numNodes); @@ -215,7 +215,7 @@ double CardinalityEstimator::getExtensionRate(const RelExpression& rel, const NodeExpression& boundNode, const Transaction* transaction) const { auto numBoundNodes = static_cast(getNumNodes(transaction, boundNode.getTableIDs())); auto numRels = static_cast(getNumRels(transaction, rel.getInnerRelTableIDs())); - KU_ASSERT(numBoundNodes > 0); + RYU_ASSERT(numBoundNodes > 0); auto oneHopExtensionRate = numRels / atLeastOne(numBoundNodes); switch (rel.getRelType()) { case QueryRelType::NON_RECURSIVE: { @@ -239,7 +239,7 @@ double CardinalityEstimator::getExtensionRate(const RelExpression& rel, return rate * context->getClientConfig()->recursivePatternCardinalityScaleFactor; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/planner/join_order/cost_model.cpp b/src/planner/join_order/cost_model.cpp index fee94304a3..25abc27e1d 100644 --- a/src/planner/join_order/cost_model.cpp +++ b/src/planner/join_order/cost_model.cpp @@ -47,7 +47,7 @@ uint64_t CostModel::computeIntersectCost(const LogicalPlan& probePlan, // case. cost += probePlan.getCardinality(); for (auto& buildPlan : buildPlans) { - KU_ASSERT(buildPlan.getCardinality() >= 1); + RYU_ASSERT(buildPlan.getCardinality() >= 1); cost += buildPlan.getCost(); } return cost; diff --git a/src/planner/join_order/join_plan_solver.cpp b/src/planner/join_order/join_plan_solver.cpp index a5586ffaad..b44a729d8a 100644 --- a/src/planner/join_order/join_plan_solver.cpp +++ b/src/planner/join_order/join_plan_solver.cpp @@ -18,7 +18,7 @@ LogicalPlan JoinPlanSolver::solveTreeNode(const JoinTreeNode& current, const Joi return solveNodeScanTreeNode(current); } case TreeNodeType::REL_SCAN: { - KU_ASSERT(parent != nullptr); + RYU_ASSERT(parent != nullptr); return solveRelScanTreeNode(current, *parent); } case TreeNodeType::BINARY_JOIN: { @@ -28,7 +28,7 @@ LogicalPlan JoinPlanSolver::solveTreeNode(const JoinTreeNode& current, const Joi return solveMultiwayJoinTreeNode(current); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -54,7 +54,7 @@ static std::shared_ptr getOtherNode(const RelExpression& LogicalPlan JoinPlanSolver::solveNodeScanTreeNode(const JoinTreeNode& treeNode) { auto& extraInfo = treeNode.extraInfo->constCast(); - KU_ASSERT(extraInfo.nodeInfo != nullptr); + RYU_ASSERT(extraInfo.nodeInfo != nullptr); auto& nodeInfo = *extraInfo.nodeInfo; auto boundNode = std::static_pointer_cast(nodeInfo.nodeOrRel); auto plan = LogicalPlan(); @@ -91,12 +91,12 @@ LogicalPlan JoinPlanSolver::solveRelScanTreeNode(const JoinTreeNode& treeNode, } break; case TreeNodeType::MULTIWAY_JOIN: { auto& joinExtraInfo = parent.extraInfo->constCast(); - KU_ASSERT(joinExtraInfo.joinNodes.size() == 1); + RYU_ASSERT(joinExtraInfo.joinNodes.size() == 1); nbrNode = joinExtraInfo.joinNodes[0]; boundNode = getOtherNode(*rel, *nbrNode); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } auto direction = getExtendDirection(*rel, *boundNode); auto plan = LogicalPlan(); @@ -123,14 +123,14 @@ LogicalPlan JoinPlanSolver::solveBinaryJoinTreeNode(const JoinTreeNode& treeNode LogicalPlan JoinPlanSolver::solveMultiwayJoinTreeNode(const JoinTreeNode& treeNode) { auto& extraInfo = treeNode.extraInfo->constCast(); - KU_ASSERT(extraInfo.joinNodes.size() == 1); + RYU_ASSERT(extraInfo.joinNodes.size() == 1); auto& joinNode = extraInfo.joinNodes[0]->constCast(); auto probePlan = solveTreeNode(*treeNode.children[0], &treeNode); std::vector buildPlans; expression_vector boundNodeIDs; for (auto i = 1u; i < treeNode.children.size(); ++i) { auto child = treeNode.children[i]; - KU_ASSERT(child->type == TreeNodeType::REL_SCAN); + RYU_ASSERT(child->type == TreeNodeType::REL_SCAN); auto& childExtraInfo = child->extraInfo->constCast(); auto rel = std::static_pointer_cast(childExtraInfo.relInfos[0].nodeOrRel); auto boundNode = *rel->getSrcNode() == joinNode ? rel->getDstNode() : rel->getSrcNode(); diff --git a/src/planner/join_order/join_tree.cpp b/src/planner/join_order/join_tree.cpp index 9464b44d8c..49818e6b6f 100644 --- a/src/planner/join_order/join_tree.cpp +++ b/src/planner/join_order/join_tree.cpp @@ -14,12 +14,12 @@ std::string TreeNodeTypeUtils::toString(TreeNodeType type) { case TreeNodeType::MULTIWAY_JOIN: return "MULTIWAY_JOIN"; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } void ExtraScanTreeNodeInfo::merge(const ExtraScanTreeNodeInfo& other) { - KU_ASSERT(other.nodeInfo == nullptr && other.relInfos.size() == 1); + RYU_ASSERT(other.nodeInfo == nullptr && other.relInfos.size() == 1); relInfos.push_back(other.relInfos[0]); } @@ -36,11 +36,11 @@ std::string JoinTreeNode::toString() const { return result; } case TreeNodeType::BINARY_JOIN: { - KU_ASSERT(children.size() == 2); + RYU_ASSERT(children.size() == 2); return "JOIN(" + children[0]->toString() + "," + children[1]->toString() + ")"; } case TreeNodeType::MULTIWAY_JOIN: { - KU_ASSERT(!children.empty()); + RYU_ASSERT(!children.empty()); auto result = "MULTI_JOIN(" + children[0]->toString(); for (auto i = 1u; i < children.size(); ++i) { result += "," + children[i]->toString(); @@ -48,7 +48,7 @@ std::string JoinTreeNode::toString() const { return result; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/planner/join_order/join_tree_constructor.cpp b/src/planner/join_order/join_tree_constructor.cpp index 5fbe364995..370074b2f8 100644 --- a/src/planner/join_order/join_tree_constructor.cpp +++ b/src/planner/join_order/join_tree_constructor.cpp @@ -23,7 +23,7 @@ JoinTree JoinTreeConstructor::construct(std::shared_ptr root) static std::vector> getJoinNodes(const SubqueryGraph& subgraph, const SubqueryGraph& otherSubgraph) { - KU_ASSERT(&subgraph.queryGraph == &otherSubgraph.queryGraph); + RYU_ASSERT(&subgraph.queryGraph == &otherSubgraph.queryGraph); std::vector> joinNodes; for (auto idx : subgraph.getNbrNodeIndices()) { if (otherSubgraph.queryNodesSelector[idx]) { @@ -64,7 +64,7 @@ JoinTreeConstructor::IntermediateResult JoinTreeConstructor::constructTreeNode( if (ExpressionUtil::isNodePattern(*hintNode->nodeOrRel)) { return constructNodeScan(hintNode->nodeOrRel); } else { - KU_ASSERT(ExpressionUtil::isRelPattern(*hintNode->nodeOrRel) || + RYU_ASSERT(ExpressionUtil::isRelPattern(*hintNode->nodeOrRel) || ExpressionUtil::isRecursiveRelPattern(*hintNode->nodeOrRel)); return constructRelScan(hintNode->nodeOrRel); } @@ -101,7 +101,7 @@ JoinTreeConstructor::IntermediateResult JoinTreeConstructor::constructTreeNode( return {treeNode, newSubgraph}; } // Construct multi-way join - KU_ASSERT(hintNode->isMultiWay()); + RYU_ASSERT(hintNode->isMultiWay()); auto probe = constructTreeNode(hintNode->children[0]); auto newSubgraph = probe.subqueryGraph; std::vector> childrenNodes; diff --git a/src/planner/operator/extend/base_logical_extend.cpp b/src/planner/operator/extend/base_logical_extend.cpp index d764fc854e..5e9645985e 100644 --- a/src/planner/operator/extend/base_logical_extend.cpp +++ b/src/planner/operator/extend/base_logical_extend.cpp @@ -45,7 +45,7 @@ std::string BaseLogicalExtend::getExpressionsForPrinting() const { result += "->"; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } result += nbrNode->toString(); return result; diff --git a/src/planner/operator/factorization/flatten_resolver.cpp b/src/planner/operator/factorization/flatten_resolver.cpp index 1817c568e6..fa83aa1d44 100644 --- a/src/planner/operator/factorization/flatten_resolver.cpp +++ b/src/planner/operator/factorization/flatten_resolver.cpp @@ -203,7 +203,7 @@ void GroupDependencyAnalyzer::visitNodeOrRel(std::shared_ptr expr) { } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/planner/operator/factorization/sink_util.cpp b/src/planner/operator/factorization/sink_util.cpp index 8fd6203760..d37ccd11d0 100644 --- a/src/planner/operator/factorization/sink_util.cpp +++ b/src/planner/operator/factorization/sink_util.cpp @@ -24,7 +24,7 @@ void SinkOperatorUtil::mergeSchema(const Schema& inputSchema, void SinkOperatorUtil::recomputeSchema(const Schema& inputSchema, const binder::expression_vector& expressionsToMerge, Schema& resultSchema) { - KU_ASSERT(!expressionsToMerge.empty()); + RYU_ASSERT(!expressionsToMerge.empty()); resultSchema.clear(); mergeSchema(inputSchema, expressionsToMerge, resultSchema); } diff --git a/src/planner/operator/logical_cross_product.cpp b/src/planner/operator/logical_cross_product.cpp index c30bef4713..8ee750e30d 100644 --- a/src/planner/operator/logical_cross_product.cpp +++ b/src/planner/operator/logical_cross_product.cpp @@ -21,7 +21,7 @@ void LogicalCrossProduct::computeFlatSchema() { auto probeSchema = children[0]->getSchema(); auto buildSchema = children[1]->getSchema(); schema = probeSchema->copy(); - KU_ASSERT(schema->getNumGroups() == 1); + RYU_ASSERT(schema->getNumGroups() == 1); for (auto& expression : buildSchema->getExpressionsInScope()) { schema->insertToGroupAndScope(expression, 0); } diff --git a/src/planner/operator/logical_explain.cpp b/src/planner/operator/logical_explain.cpp index 6ea8358df9..92d67259c0 100644 --- a/src/planner/operator/logical_explain.cpp +++ b/src/planner/operator/logical_explain.cpp @@ -19,7 +19,7 @@ void LogicalExplain::computeSchema() { createEmptySchema(); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/planner/operator/logical_hash_join.cpp b/src/planner/operator/logical_hash_join.cpp index 16a290abf2..cbbd5064cc 100644 --- a/src/planner/operator/logical_hash_join.cpp +++ b/src/planner/operator/logical_hash_join.cpp @@ -82,7 +82,7 @@ void LogicalHashJoin::computeFactorizedSchema() { schema->insertToGroupAndScope(mark, markPos); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -106,7 +106,7 @@ void LogicalHashJoin::computeFlatSchema() { schema->insertToGroupAndScope(mark, 0); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -128,7 +128,7 @@ binder::expression_vector LogicalHashJoin::getExpressionsToMaterialize() const { return binder::expression_vector{}; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/planner/operator/logical_path_property_probe.cpp b/src/planner/operator/logical_path_property_probe.cpp index d229bee81a..57f0f83186 100644 --- a/src/planner/operator/logical_path_property_probe.cpp +++ b/src/planner/operator/logical_path_property_probe.cpp @@ -9,7 +9,7 @@ namespace planner { void LogicalPathPropertyProbe::computeFactorizedSchema() { copyChildSchema(0); if (pathNodeIDs != nullptr) { - KU_ASSERT(schema->getNumGroups() == 1); + RYU_ASSERT(schema->getNumGroups() == 1); schema->insertToGroupAndScope(recursiveRel, 0); } @@ -26,7 +26,7 @@ void LogicalPathPropertyProbe::computeFactorizedSchema() { void LogicalPathPropertyProbe::computeFlatSchema() { copyChildSchema(0); if (pathNodeIDs != nullptr) { - KU_ASSERT(schema->getNumGroups() == 1); + RYU_ASSERT(schema->getNumGroups() == 1); schema->insertToGroupAndScope(recursiveRel, 0); } diff --git a/src/planner/operator/persistent/logical_delete.cpp b/src/planner/operator/persistent/logical_delete.cpp index a9a02462bb..1c219a0cf4 100644 --- a/src/planner/operator/persistent/logical_delete.cpp +++ b/src/planner/operator/persistent/logical_delete.cpp @@ -20,7 +20,7 @@ std::string LogicalDelete::getExpressionsForPrinting() const { } f_group_pos_set LogicalDelete::getGroupsPosToFlatten() const { - KU_ASSERT(!infos.empty()); + RYU_ASSERT(!infos.empty()); const auto childSchema = children[0]->getSchema(); f_group_pos_set dependentGroupPos; switch (infos[0].tableType) { @@ -38,7 +38,7 @@ f_group_pos_set LogicalDelete::getGroupsPosToFlatten() const { } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return FlattenAll::getGroupsPosToFlatten(dependentGroupPos, *childSchema); } diff --git a/src/planner/operator/persistent/logical_set.cpp b/src/planner/operator/persistent/logical_set.cpp index 4744447ad3..d93ea36cdc 100644 --- a/src/planner/operator/persistent/logical_set.cpp +++ b/src/planner/operator/persistent/logical_set.cpp @@ -33,7 +33,7 @@ f_group_pos_set LogicalSetProperty::getGroupsPosToFlatten(uint32_t idx) const { result.insert(childSchema->getGroupPos(*rel->getDstNode()->getInternalID())); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } auto analyzer = GroupDependencyAnalyzer(false, *childSchema); analyzer.visit(info.columnData); @@ -53,7 +53,7 @@ std::string LogicalSetProperty::getExpressionsForPrinting() const { } common::TableType LogicalSetProperty::getTableType() const { - KU_ASSERT(!infos.empty()); + RYU_ASSERT(!infos.empty()); return infos[0].tableType; } diff --git a/src/planner/operator/scan/logical_scan_node_table.cpp b/src/planner/operator/scan/logical_scan_node_table.cpp index 6dcbb68df0..4037a0faf2 100644 --- a/src/planner/operator/scan/logical_scan_node_table.cpp +++ b/src/planner/operator/scan/logical_scan_node_table.cpp @@ -16,7 +16,7 @@ LogicalScanNodeTable::LogicalScanNodeTable(const LogicalScanNodeTable& other) void LogicalScanNodeTable::computeFactorizedSchema() { createEmptySchema(); const auto groupPos = schema->createGroup(); - KU_ASSERT(groupPos == 0); + RYU_ASSERT(groupPos == 0); schema->insertToGroupAndScope(nodeID, groupPos); for (auto& property : properties) { schema->insertToGroupAndScope(property, groupPos); diff --git a/src/planner/operator/schema.cpp b/src/planner/operator/schema.cpp index 3b50b9ad65..2ac2563e7d 100644 --- a/src/planner/operator/schema.cpp +++ b/src/planner/operator/schema.cpp @@ -16,15 +16,15 @@ f_group_pos Schema::createGroup() { } void Schema::insertToScope(const std::shared_ptr& expression, f_group_pos groupPos) { - KU_ASSERT(!expressionNameToGroupPos.contains(expression->getUniqueName())); + RYU_ASSERT(!expressionNameToGroupPos.contains(expression->getUniqueName())); expressionNameToGroupPos.insert({expression->getUniqueName(), groupPos}); - KU_ASSERT(getGroup(groupPos)->expressionNameToPos.contains(expression->getUniqueName())); + RYU_ASSERT(getGroup(groupPos)->expressionNameToPos.contains(expression->getUniqueName())); expressionsInScope.push_back(expression); } void Schema::insertToGroupAndScope(const std::shared_ptr& expression, f_group_pos groupPos) { - KU_ASSERT(!expressionNameToGroupPos.contains(expression->getUniqueName())); + RYU_ASSERT(!expressionNameToGroupPos.contains(expression->getUniqueName())); expressionNameToGroupPos.insert({expression->getUniqueName(), groupPos}); groups[groupPos]->insertExpression(expression); expressionsInScope.push_back(expression); @@ -53,7 +53,7 @@ void Schema::insertToGroupAndScope(const expression_vector& expressions, f_group } f_group_pos Schema::getGroupPos(const std::string& expressionName) const { - KU_ASSERT(expressionNameToGroupPos.contains(expressionName)); + RYU_ASSERT(expressionNameToGroupPos.contains(expressionName)); return expressionNameToGroupPos.at(expressionName); } diff --git a/src/planner/plan/append_cross_product.cpp b/src/planner/plan/append_cross_product.cpp index cc4e9dadd6..aecec059ce 100644 --- a/src/planner/plan/append_cross_product.cpp +++ b/src/planner/plan/append_cross_product.cpp @@ -20,7 +20,7 @@ void Planner::appendOptionalCrossProduct(std::shared_ptr mark, void Planner::appendAccOptionalCrossProduct(std::shared_ptr mark, LogicalPlan& probePlan, const LogicalPlan& buildPlan, LogicalPlan& resultPlan) { - KU_ASSERT(probePlan.hasUpdate()); + RYU_ASSERT(probePlan.hasUpdate()); tryAppendAccumulate(probePlan); appendCrossProduct(AccumulateType::OPTIONAL_, mark, probePlan, buildPlan, resultPlan); auto& sipInfo = resultPlan.getLastOperator()->cast().getSIPInfoUnsafe(); diff --git a/src/planner/plan/append_distinct.cpp b/src/planner/plan/append_distinct.cpp index 5042b42edb..9ddc4ef470 100644 --- a/src/planner/plan/append_distinct.cpp +++ b/src/planner/plan/append_distinct.cpp @@ -7,7 +7,7 @@ namespace ryu { namespace planner { void Planner::appendDistinct(const expression_vector& keys, LogicalPlan& plan) { - KU_ASSERT(!keys.empty()); + RYU_ASSERT(!keys.empty()); auto distinct = make_shared(keys, plan.getLastOperator()); appendFlattens(distinct->getGroupsPosToFlatten(), plan); distinct->setChild(0, plan.getLastOperator()); diff --git a/src/planner/plan/append_dummy_scan.cpp b/src/planner/plan/append_dummy_scan.cpp index 76c4006699..df8a55d605 100644 --- a/src/planner/plan/append_dummy_scan.cpp +++ b/src/planner/plan/append_dummy_scan.cpp @@ -5,7 +5,7 @@ namespace ryu { namespace planner { void Planner::appendDummyScan(LogicalPlan& plan) { - KU_ASSERT(plan.isEmpty()); + RYU_ASSERT(plan.isEmpty()); auto dummyScan = std::make_shared(); dummyScan->computeFactorizedSchema(); plan.setLastOperator(std::move(dummyScan)); diff --git a/src/planner/plan/append_extend.cpp b/src/planner/plan/append_extend.cpp index b65b16ccc8..eddefd635e 100644 --- a/src/planner/plan/append_extend.cpp +++ b/src/planner/plan/append_extend.cpp @@ -38,7 +38,7 @@ static std::unordered_set getBoundNodeTableIDSet(const RelExpression result.merge(groupEntry.getBoundNodeTableIDSet(RelDataDirection::BWD)); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return result; @@ -61,7 +61,7 @@ static std::unordered_set getNbrNodeTableIDSet(const RelExpression& result.merge(groupEntry.getNbrNodeTableIDSet(RelDataDirection::BWD)); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return result; diff --git a/src/planner/plan/append_join.cpp b/src/planner/plan/append_join.cpp index 131532e024..bacedac71b 100644 --- a/src/planner/plan/append_join.cpp +++ b/src/planner/plan/append_join.cpp @@ -51,7 +51,7 @@ void Planner::appendHashJoin(const std::vector& joinConditions, void Planner::appendAccHashJoin(const std::vector& joinConditions, JoinType joinType, std::shared_ptr mark, LogicalPlan& probePlan, LogicalPlan& buildPlan, LogicalPlan& resultPlan) { - KU_ASSERT(probePlan.hasUpdate()); + RYU_ASSERT(probePlan.hasUpdate()); tryAppendAccumulate(probePlan); appendHashJoin(joinConditions, joinType, mark, probePlan, buildPlan, resultPlan); auto& sipInfo = probePlan.getLastOperator()->cast().getSIPInfoUnsafe(); @@ -88,7 +88,7 @@ void Planner::appendMarkJoin(const std::vector& joinConditions, void Planner::appendIntersect(const std::shared_ptr& intersectNodeID, expression_vector& boundNodeIDs, LogicalPlan& probePlan, std::vector& buildPlans) { - KU_ASSERT(boundNodeIDs.size() == buildPlans.size()); + RYU_ASSERT(boundNodeIDs.size() == buildPlans.size()); std::vector> buildChildren; expression_vector keyNodeIDs; for (auto i = 0u; i < buildPlans.size(); ++i) { diff --git a/src/planner/plan/append_simple.cpp b/src/planner/plan/append_simple.cpp index 50e689a3be..545076c79f 100644 --- a/src/planner/plan/append_simple.cpp +++ b/src/planner/plan/append_simple.cpp @@ -57,7 +57,7 @@ LogicalPlan Planner::planCreateTable(const BoundStatement& statement) { children.push_back(planCopyRelFrom(&createTable.getCopyInfo()).getLastOperator()); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } auto create = std::make_shared(info.copy()); @@ -163,7 +163,7 @@ LogicalPlan Planner::planExtensionClause(const BoundStatement& statement) { return getSimplePlan(op); } } - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // namespace planner diff --git a/src/planner/plan/plan_copy.cpp b/src/planner/plan/plan_copy.cpp index 0aee4c4fa4..acdde7a1a0 100644 --- a/src/planner/plan/plan_copy.cpp +++ b/src/planner/plan/plan_copy.cpp @@ -55,7 +55,7 @@ LogicalPlan Planner::planCopyFrom(const BoundStatement& statement) { return planCopyRelFrom(copyFromInfo); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -78,7 +78,7 @@ LogicalPlan Planner::planCopyNodeFrom(const BoundCopyFromInfo* info) { } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } appendCopyFrom(*info, plan); return plan; @@ -104,7 +104,7 @@ LogicalPlan Planner::planCopyRelFrom(const BoundCopyFromInfo* info) { nullptr /* mark */, plan); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } auto& extraInfo = info->extraInfo->constCast(); // If the table entry doesn't exist, assume both directions @@ -129,7 +129,7 @@ LogicalPlan Planner::planCopyTo(const BoundStatement& statement) { for (auto& column : regularQuery->getStatementResult()->getColumns()) { columnNames.push_back(column->toString()); } - KU_ASSERT(regularQuery->getStatementType() == StatementType::QUERY); + RYU_ASSERT(regularQuery->getStatementType() == StatementType::QUERY); auto plan = planStatement(*regularQuery); auto copyTo = make_shared(boundCopyTo.getBindData()->copy(), boundCopyTo.getExportFunc(), plan.getLastOperator()); diff --git a/src/planner/plan/plan_join_order.cpp b/src/planner/plan/plan_join_order.cpp index d6c7778fef..631a642740 100644 --- a/src/planner/plan/plan_join_order.cpp +++ b/src/planner/plan/plan_join_order.cpp @@ -39,7 +39,7 @@ static int32_t getConnectedQueryGraphIdx(const QueryGraphCollection& queryGraphC LogicalPlan Planner::planQueryGraphCollection(const QueryGraphCollection& queryGraphCollection, const QueryGraphPlanningInfo& info) { - KU_ASSERT(queryGraphCollection.getNumQueryGraphs() > 0); + RYU_ASSERT(queryGraphCollection.getNumQueryGraphs() > 0); auto& corrExprs = info.corrExprs; int32_t queryGraphIdxToPlanExpressionsScan = -1; if (info.subqueryType == SubqueryPlanningType::CORRELATED) { @@ -89,7 +89,7 @@ LogicalPlan Planner::planQueryGraphCollection(const QueryGraphCollection& queryG } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } planPerQueryGraph.push_back(std::move(plan)); } @@ -152,7 +152,7 @@ LogicalPlan Planner::planQueryGraph(const QueryGraph& queryGraph, } void Planner::planLevel(uint32_t level) { - KU_ASSERT(level > 1); + RYU_ASSERT(level > 1); if (level > MAX_LEVEL_TO_PLAN_EXACTLY) { planLevelApproximately(level); } else { @@ -213,7 +213,7 @@ void Planner::planBaseTableScans(const QueryGraphPlanningInfo& info) { planCorrelatedExpressionsScan(info); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } for (auto relPos = 0u; relPos < queryGraph->getNumQueryRels(); ++relPos) { planRelScan(relPos); @@ -264,7 +264,7 @@ void Planner::planNodeIDScan(uint32_t nodePos) { static std::pair, std::shared_ptr> getBoundAndNbrNodes(const RelExpression& rel, ExtendDirection direction) { - KU_ASSERT(direction != ExtendDirection::BOTH); + RYU_ASSERT(direction != ExtendDirection::BOTH); auto boundNode = direction == ExtendDirection::FWD ? rel.getSrcNode() : rel.getDstNode(); auto dstNode = direction == ExtendDirection::FWD ? rel.getDstNode() : rel.getSrcNode(); return make_pair(boundNode, dstNode); @@ -273,7 +273,7 @@ getBoundAndNbrNodes(const RelExpression& rel, ExtendDirection direction) { static ExtendDirection getExtendDirection(const binder::RelExpression& relExpression, const binder::NodeExpression& boundNode) { if (relExpression.getDirectionType() == binder::RelDirectionType::BOTH) { - KU_ASSERT(relExpression.getExtendDirections().size() == common::NUM_REL_DIRECTIONS); + RYU_ASSERT(relExpression.getExtendDirections().size() == common::NUM_REL_DIRECTIONS); return ExtendDirection::BOTH; } if (relExpression.getSrcNodeName() == boundNode.getUniqueName()) { @@ -319,7 +319,7 @@ void Planner::appendExtend(std::shared_ptr boundNode, appendRecursiveExtend(boundNode, nbrNode, rel, direction, plan); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -352,7 +352,7 @@ populateIntersectRelCandidates(const QueryGraph& queryGraph, const SubqueryGraph } void Planner::planWCOJoin(uint32_t leftLevel, uint32_t rightLevel) { - KU_ASSERT(leftLevel <= rightLevel); + RYU_ASSERT(leftLevel <= rightLevel); auto queryGraph = context.getQueryGraph(); for (auto& rightSubgraph : context.subPlansTable->getSubqueryGraphs(rightLevel)) { auto candidates = populateIntersectRelCandidates(*queryGraph, rightSubgraph); @@ -431,7 +431,7 @@ void Planner::planWCOJoin(const SubqueryGraph& subgraph, // fetch build plans for rel auto relSubgraph = context.getEmptySubqueryGraph(); relSubgraph.addQueryRel(relPos); - KU_ASSERT(context.subPlansTable->containSubgraphPlans(relSubgraph)); + RYU_ASSERT(context.subPlansTable->containSubgraphPlans(relSubgraph)); auto& relPlanCandidates = context.subPlansTable->getSubgraphPlans(relSubgraph); auto relPlan = getWCOJBuildPlanForRel(relPlanCandidates, *boundNode); if (relPlan.isEmpty()) { // Cannot find a suitable rel plan. @@ -487,7 +487,7 @@ static bool needPruneImplicitJoins(const SubqueryGraph& leftSubgraph, } void Planner::planInnerJoin(uint32_t leftLevel, uint32_t rightLevel) { - KU_ASSERT(leftLevel <= rightLevel); + RYU_ASSERT(leftLevel <= rightLevel); for (auto& rightSubgraph : context.subPlansTable->getSubqueryGraphs(rightLevel)) { for (auto& nbrSubgraph : rightSubgraph.getNbrSubgraphs(leftLevel)) { // E.g. MATCH (a)->(b) MATCH (b)->(c) @@ -528,7 +528,7 @@ bool Planner::tryPlanINLJoin(const SubqueryGraph& subgraph, const SubqueryGraph& relPos = i; } } - KU_ASSERT(relPos != UINT32_MAX); + RYU_ASSERT(relPos != UINT32_MAX); auto rel = context.queryGraph->getQueryRel(relPos); const auto& boundNode = joinNodes[0]; auto nbrNode = diff --git a/src/planner/plan/plan_port_db.cpp b/src/planner/plan/plan_port_db.cpp index 88963e10ad..3f10dbe651 100644 --- a/src/planner/plan/plan_port_db.cpp +++ b/src/planner/plan/plan_port_db.cpp @@ -32,11 +32,11 @@ std::vector> Planner::planExportTableData( Catalog::Get(*clientContext)->getFunctionEntry(Transaction::Get(*clientContext), name); auto func = function::BuiltInFunctionsUtils::matchFunction(name, entry->ptrCast()); - KU_ASSERT(func != nullptr); + RYU_ASSERT(func != nullptr); auto exportFunc = *func->constPtrCast(); for (auto& exportTableData : *boundExportDatabase.getExportData()) { auto regularQuery = exportTableData.getRegularQuery(); - KU_ASSERT(regularQuery->getStatementType() == StatementType::QUERY); + RYU_ASSERT(regularQuery->getStatementType() == StatementType::QUERY); auto tablePlan = planStatement(*regularQuery); auto path = VirtualFileSystem::GetUnsafe(*clientContext) ->joinPath(boundExportDatabase.getFilePath(), exportTableData.fileName); diff --git a/src/planner/plan/plan_projection.cpp b/src/planner/plan/plan_projection.cpp index 485123596d..71ac293af0 100644 --- a/src/planner/plan/plan_projection.cpp +++ b/src/planner/plan/plan_projection.cpp @@ -50,7 +50,7 @@ void Planner::planProjectionBody(const BoundProjectionBody* projectionBody, Logi void Planner::planAggregate(const expression_vector& expressionsToAggregate, const expression_vector& expressionsToGroupBy, LogicalPlan& plan) { - KU_ASSERT(!expressionsToAggregate.empty()); + RYU_ASSERT(!expressionsToAggregate.empty()); expression_vector expressionsToProject; for (auto& expressionToAggregate : expressionsToAggregate) { if (ExpressionChildrenCollector::collectChildren(*expressionToAggregate) diff --git a/src/planner/plan/plan_read.cpp b/src/planner/plan/plan_read.cpp index 09c7ca7662..72b69d475c 100644 --- a/src/planner/plan/plan_read.cpp +++ b/src/planner/plan/plan_read.cpp @@ -25,7 +25,7 @@ void Planner::planReadingClause(const BoundReadingClause& readingClause, Logical planLoadFrom(readingClause, plan); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -48,7 +48,7 @@ void Planner::planMatchClause(const BoundReadingClause& readingClause, LogicalPl planOptionalMatch(*queryGraphCollection, predicates, plan, boundMatchClause.getHint()); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -103,7 +103,7 @@ void Planner::planTableFunctionCall(const BoundReadingClause& readingClause, Log auto& boundCall = readingClause.constCast(); auto analyzer = PredicatesDependencyAnalyzer(boundCall.getBindData()->columns); analyzer.analyze(boundCall.getConjunctivePredicates()); - KU_ASSERT(boundCall.getTableFunc().getLogicalPlanFunc); + RYU_ASSERT(boundCall.getTableFunc().getLogicalPlanFunc); boundCall.getTableFunc().getLogicalPlanFunc(this, readingClause, analyzer.predicatesDependsOnlyOnOutputColumns, plan); if (!analyzer.predicatesWithOtherDependencies.empty()) { diff --git a/src/planner/plan/plan_subquery.cpp b/src/planner/plan/plan_subquery.cpp index fb453dedd3..3a29788a9c 100644 --- a/src/planner/plan/plan_subquery.cpp +++ b/src/planner/plan/plan_subquery.cpp @@ -218,7 +218,7 @@ void Planner::planRegularMatch(const QueryGraphCollection& queryGraphCollection, } void Planner::planSubquery(const std::shared_ptr& expression, LogicalPlan& outerPlan) { - KU_ASSERT(expression->expressionType == ExpressionType::SUBQUERY); + RYU_ASSERT(expression->expressionType == ExpressionType::SUBQUERY); auto subquery = expression->ptrCast(); auto correlatedExprs = getDependentExprs(expression, *outerPlan.getSchema()); auto predicates = subquery->getPredicatesSplitOnAnd(); @@ -243,7 +243,7 @@ void Planner::planSubquery(const std::shared_ptr& expression, Logica appendAggregate(emptyHashKeys, projectExprs, innerPlan); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } appendCrossProduct(outerPlan, innerPlan, outerPlan); return; @@ -287,7 +287,7 @@ void Planner::planSubquery(const std::shared_ptr& expression, Logica outerPlan); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/planner/plan/plan_update.cpp b/src/planner/plan/plan_update.cpp index f04e861d6a..ece6d733f5 100644 --- a/src/planner/plan/plan_update.cpp +++ b/src/planner/plan/plan_update.cpp @@ -30,7 +30,7 @@ void Planner::planUpdatingClause(const BoundUpdatingClause& updatingClause, Logi return; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/planner/planner.cpp b/src/planner/planner.cpp index dd9efe8a98..d20b7a7b56 100644 --- a/src/planner/planner.cpp +++ b/src/planner/planner.cpp @@ -121,7 +121,7 @@ LogicalPlan Planner::planStatement(const BoundStatement& statement) { return planExtensionClause(statement); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/planner/query_planner.cpp b/src/planner/query_planner.cpp index 5e9103fb09..246c039bc9 100644 --- a/src/planner/query_planner.cpp +++ b/src/planner/query_planner.cpp @@ -23,7 +23,7 @@ LogicalPlan Planner::planQuery(const BoundStatement& boundStatement) { LogicalPlan Planner::createUnionPlan(std::vector& childrenPlans, const expression_vector& expressions, bool isUnionAll) { - KU_ASSERT(!childrenPlans.empty()); + RYU_ASSERT(!childrenPlans.empty()); auto plan = LogicalPlan(); std::vector> children; children.reserve(childrenPlans.size()); @@ -45,7 +45,7 @@ LogicalPlan Planner::createUnionPlan(std::vector& childrenPlans, } expression_vector Planner::getProperties(const Expression& pattern) const { - KU_ASSERT(pattern.expressionType == ExpressionType::PATTERN); + RYU_ASSERT(pattern.expressionType == ExpressionType::PATTERN); return propertyExprCollection.getProperties(pattern); } diff --git a/src/planner/subplans_table.cpp b/src/planner/subplans_table.cpp index 77807b0c03..3638cd8a1d 100644 --- a/src/planner/subplans_table.cpp +++ b/src/planner/subplans_table.cpp @@ -90,7 +90,7 @@ bool SubPlansTable::containSubgraphPlans(const SubqueryGraph& subqueryGraph) con const std::vector& SubPlansTable::getSubgraphPlans( const SubqueryGraph& subqueryGraph) const { auto& dpLevel = getDPLevel(subqueryGraph); - KU_ASSERT(dpLevel.contains(subqueryGraph)); + RYU_ASSERT(dpLevel.contains(subqueryGraph)); return dpLevel.getSubgraphPlans(subqueryGraph).getPlans(); } diff --git a/src/processor/map/create_factorized_table_scan.cpp b/src/processor/map/create_factorized_table_scan.cpp index 897907b48a..54b00cc3f0 100644 --- a/src/processor/map/create_factorized_table_scan.cpp +++ b/src/processor/map/create_factorized_table_scan.cpp @@ -15,7 +15,7 @@ std::unique_ptr PlanMapper::createFTableScan(const expression_ std::shared_ptr table, uint64_t maxMorselSize, physical_op_vector_t children) { std::vector outPosV; if (!exprs.empty()) { - KU_ASSERT(schema); + RYU_ASSERT(schema); outPosV = getDataPos(exprs, *schema); } auto function = FTableScan::getFunction(); diff --git a/src/processor/map/expression_mapper.cpp b/src/processor/map/expression_mapper.cpp index c266a950e6..916e1838c7 100644 --- a/src/processor/map/expression_mapper.cpp +++ b/src/processor/map/expression_mapper.cpp @@ -82,7 +82,7 @@ std::unique_ptr ExpressionMapper::getEvaluator( std::unique_ptr ExpressionMapper::getConstantEvaluator( std::shared_ptr expression) { - KU_ASSERT(ConstantExpressionVisitor::isConstant(*expression)); + RYU_ASSERT(ConstantExpressionVisitor::isConstant(*expression)); auto expressionType = expression->expressionType; if (ExpressionType::LITERAL == expressionType) { return getLiteralEvaluator(std::move(expression)); @@ -114,7 +114,7 @@ std::unique_ptr ExpressionMapper::getParameterEvaluator( std::unique_ptr ExpressionMapper::getReferenceEvaluator( std::shared_ptr expression) const { - KU_ASSERT(schema != nullptr); + RYU_ASSERT(schema != nullptr); auto vectorPos = DataPos(schema->getExpressionPos(*expression)); auto expressionGroup = schema->getGroup(expression->getUniqueName()); return std::make_unique(std::move(expression), diff --git a/src/processor/map/map_acc_hash_join.cpp b/src/processor/map/map_acc_hash_join.cpp index a164819222..da6bad7b9c 100644 --- a/src/processor/map/map_acc_hash_join.cpp +++ b/src/processor/map/map_acc_hash_join.cpp @@ -8,7 +8,7 @@ namespace processor { static PhysicalOperator* getTableScan(const PhysicalOperator* joinRoot) { auto op = joinRoot->getChild(0); while (op->getOperatorType() != PhysicalOperatorType::TABLE_FUNCTION_CALL) { - KU_ASSERT(op->getNumChildren() != 0); + RYU_ASSERT(op->getNumChildren() != 0); op = op->getChild(0); } return op; diff --git a/src/processor/map/map_copy_from.cpp b/src/processor/map/map_copy_from.cpp index 11e14a1e7d..bdf2f880fd 100644 --- a/src/processor/map/map_copy_from.cpp +++ b/src/processor/map/map_copy_from.cpp @@ -36,7 +36,7 @@ std::unique_ptr PlanMapper::mapCopyFrom(const LogicalOperator* return mapCopyRelFrom(logicalOperator); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -120,7 +120,7 @@ std::unique_ptr PlanMapper::mapCopyRelFrom( auto& copyFrom = logicalOperator->constCast(); const auto copyFromInfo = copyFrom.getInfo(); auto partitioner = mapOperator(copyFrom.getChild(0).get()); - KU_ASSERT(partitioner->getOperatorType() == PhysicalOperatorType::PARTITIONER); + RYU_ASSERT(partitioner->getOperatorType() == PhysicalOperatorType::PARTITIONER); auto partitionerSharedState = partitioner->ptrCast()->getSharedState(); const auto catalog = Catalog::Get(*clientContext); const auto transaction = transaction::Transaction::Get(*clientContext); diff --git a/src/processor/map/map_delete.cpp b/src/processor/map/map_delete.cpp index 315bcb619c..45123fc91c 100644 --- a/src/processor/map/map_delete.cpp +++ b/src/processor/map/map_delete.cpp @@ -66,7 +66,7 @@ NodeTableDeleteInfo PlanMapper::getNodeTableDeleteInfo(const TableCatalogEntry& std::unique_ptr PlanMapper::getNodeDeleteExecutor( const BoundDeleteInfo& boundInfo, const Schema& schema) const { - KU_ASSERT(boundInfo.tableType == TableType::NODE); + RYU_ASSERT(boundInfo.tableType == TableType::NODE); auto& node = boundInfo.pattern->constCast(); auto nodeIDPos = getDataPos(*node.getInternalID(), schema); auto info = NodeDeleteInfo(boundInfo.deleteType, nodeIDPos); @@ -83,7 +83,7 @@ std::unique_ptr PlanMapper::getNodeDeleteExecutor( return std::make_unique(std::move(info), std::move(tableInfos)); } - KU_ASSERT(node.getNumEntries() == 1); + RYU_ASSERT(node.getNumEntries() == 1); auto entry = node.getEntry(0); auto pkPos = getDataPos(*node.getPrimaryKey(entry->getTableID()), schema); auto extraInfo = getNodeTableDeleteInfo(*entry, pkPos); @@ -100,7 +100,7 @@ std::unique_ptr PlanMapper::mapDelete(const LogicalOperator* l return mapDeleteRel(logicalOperator); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -146,7 +146,7 @@ std::unique_ptr PlanMapper::getRelDeleteExecutor( return std::make_unique(std::move(tableIDToTableMap), std::move(info)); } - KU_ASSERT(rel.getNumEntries() == 1); + RYU_ASSERT(rel.getNumEntries() == 1); auto& entry = rel.getEntry(0)->constCast(); auto relEntryInfo = entry.getSingleRelEntryInfo(); auto table = storageManager->getTable(relEntryInfo.oid)->ptrCast(); diff --git a/src/processor/map/map_expressions_scan.cpp b/src/processor/map/map_expressions_scan.cpp index 8f723be2a7..529bbe584a 100644 --- a/src/processor/map/map_expressions_scan.cpp +++ b/src/processor/map/map_expressions_scan.cpp @@ -23,14 +23,14 @@ std::unique_ptr PlanMapper::mapExpressionsScan( auto expressionsToScan = expressionsScan.getExpressions(); std::vector colIndicesToScan; for (auto& expression : expressionsToScan) { - KU_ASSERT(materializedExpressionToColIdx.contains(expression)); + RYU_ASSERT(materializedExpressionToColIdx.contains(expression)); colIndicesToScan.push_back(materializedExpressionToColIdx.at(expression)); } auto schema = expressionsScan.getSchema(); - KU_ASSERT(logicalOpToPhysicalOpMap.contains(outerAccumulate)); + RYU_ASSERT(logicalOpToPhysicalOpMap.contains(outerAccumulate)); auto physicalOp = logicalOpToPhysicalOpMap.at(outerAccumulate); - KU_ASSERT(physicalOp->getOperatorType() == PhysicalOperatorType::TABLE_FUNCTION_CALL); - KU_ASSERT(physicalOp->getChild(0)->getOperatorType() == PhysicalOperatorType::RESULT_COLLECTOR); + RYU_ASSERT(physicalOp->getOperatorType() == PhysicalOperatorType::TABLE_FUNCTION_CALL); + RYU_ASSERT(physicalOp->getChild(0)->getOperatorType() == PhysicalOperatorType::RESULT_COLLECTOR); auto resultCollector = physicalOp->getChild(0)->ptrCast(); auto table = resultCollector->getResultFTable(); return createFTableScan(expressionsToScan, colIndicesToScan, schema, table, diff --git a/src/processor/map/map_extend.cpp b/src/processor/map/map_extend.cpp index 3520fbc3f8..bcd24dbdd8 100644 --- a/src/processor/map/map_extend.cpp +++ b/src/processor/map/map_extend.cpp @@ -64,7 +64,7 @@ static bool isRelTableQualifies(ExtendDirection direction, table_id_t srcTableID return dstTableID == boundNodeTableID && nbrTableISet.contains(srcTableID); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -106,7 +106,7 @@ static std::vector populateRelTableCollectionScanner(table_id_ } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return scanInfos; @@ -143,7 +143,7 @@ std::unique_ptr PlanMapper::mapExtend(const LogicalOperator* l auto printInfo = std::make_unique(tableNames, extend->getProperties(), boundNode, rel, nbrNode, extendDirection, rel->getVariableName()); if (scanSingleRelTable(*rel, *boundNode, extendDirection)) { - KU_ASSERT(rel->getNumEntries() == 1); + RYU_ASSERT(rel->getNumEntries() == 1); auto entry = rel->getEntry(0)->ptrCast(); auto relDataDirection = ExtendDirectionUtil::getRelDataDirection(extendDirection); auto entryInfo = entry->getSingleRelEntryInfo(); diff --git a/src/processor/map/map_insert.cpp b/src/processor/map/map_insert.cpp index f96f12836c..22ff105740 100644 --- a/src/processor/map/map_insert.cpp +++ b/src/processor/map/map_insert.cpp @@ -36,7 +36,7 @@ NodeInsertExecutor PlanMapper::getNodeInsertExecutor(const LogicalInsertInfo* bo auto columnsPos = populateReturnColumnsPos(*boundInfo, outSchema); auto info = NodeInsertInfo(nodeIDPos, columnsPos, boundInfo->conflictAction); auto storageManager = StorageManager::Get(*clientContext); - KU_ASSERT(node.getNumEntries() == 1); + RYU_ASSERT(node.getNumEntries() == 1); ; auto table = storageManager->getTable(node.getEntry(0)->getTableID())->ptrCast(); evaluator_vector_t evaluators; @@ -58,10 +58,10 @@ RelInsertExecutor PlanMapper::getRelInsertExecutor(const LogicalInsertInfo* boun auto columnsPos = populateReturnColumnsPos(*boundInfo, outSchema); auto info = RelInsertInfo(srcNodeIDPos, dstNodeIDPos, std::move(columnsPos)); auto storageManager = StorageManager::Get(*clientContext); - KU_ASSERT(srcNode->getNumEntries() == 1 && dstNode->getNumEntries() == 1); + RYU_ASSERT(srcNode->getNumEntries() == 1 && dstNode->getNumEntries() == 1); auto srcTableID = srcNode->getEntry(0)->getTableID(); auto dstTableID = dstNode->getEntry(0)->getTableID(); - KU_ASSERT(rel.getNumEntries() == 1); + RYU_ASSERT(rel.getNumEntries() == 1); auto& relGroupEntry = rel.getEntry(0)->constCast(); auto relEntryInfo = relGroupEntry.getRelEntryInfo(srcTableID, dstTableID); auto table = storageManager->getTable(relEntryInfo->oid)->ptrCast(); @@ -90,7 +90,7 @@ std::unique_ptr PlanMapper::mapInsert(const LogicalOperator* l relExecutors.push_back(getRelInsertExecutor(&info, *inSchema, *outSchema)); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } expression_vector expressions; diff --git a/src/processor/map/map_noop.cpp b/src/processor/map/map_noop.cpp index 4268ff2063..15017e92b4 100644 --- a/src/processor/map/map_noop.cpp +++ b/src/processor/map/map_noop.cpp @@ -13,7 +13,7 @@ std::unique_ptr PlanMapper::mapNoop(const LogicalOperator* log } auto noop = logicalOperator->constPtrCast(); auto idx = noop->getMessageChildIdx(); - KU_ASSERT(idx < children.size()); + RYU_ASSERT(idx < children.size()); auto child = children[idx].get(); // LCOV_EXCL_START if (!child->isSink()) { diff --git a/src/processor/map/map_order_by.cpp b/src/processor/map/map_order_by.cpp index 65e82c9a12..979096e5c5 100644 --- a/src/processor/map/map_order_by.cpp +++ b/src/processor/map/map_order_by.cpp @@ -51,7 +51,7 @@ std::unique_ptr PlanMapper::mapOrderBy(const LogicalOperator* for (auto& expression : keyExpressions) { keysPos.emplace_back(inSchema->getExpressionPos(*expression)); keyTypes.push_back(expression->getDataType().copy()); - KU_ASSERT(payloadToColIdx.contains(expression)); + RYU_ASSERT(payloadToColIdx.contains(expression)); keyInPayloadPos.push_back(payloadToColIdx.at(expression)); } std::vector outPos; diff --git a/src/processor/map/map_path_property_probe.cpp b/src/processor/map/map_path_property_probe.cpp index 9a660c9875..6dc9dd332d 100644 --- a/src/processor/map/map_path_property_probe.cpp +++ b/src/processor/map/map_path_property_probe.cpp @@ -21,7 +21,7 @@ static std::pair, std::vector> get const expression_vector& payloads, uint32_t numKeys, const LogicalType& structType) { std::unordered_map propertyNameToColumnIdx; for (auto i = 0u; i < payloads.size(); ++i) { - KU_ASSERT(payloads[i]->expressionType == ExpressionType::PROPERTY); + RYU_ASSERT(payloads[i]->expressionType == ExpressionType::PROPERTY); auto propertyName = payloads[i]->ptrCast()->getPropertyName(); StringUtils::toUpper(propertyName); propertyNameToColumnIdx.insert({propertyName, i + numKeys}); diff --git a/src/processor/map/map_recursive_extend.cpp b/src/processor/map/map_recursive_extend.cpp index 69c09aff1c..e0c35cfc46 100644 --- a/src/processor/map/map_recursive_extend.cpp +++ b/src/processor/map/map_recursive_extend.cpp @@ -49,9 +49,9 @@ std::unique_ptr PlanMapper::mapRecursiveExtend( addOperatorMapping(logicalOperator, recursiveExtend.get()); sharedState->setPathNodeMask(std::make_unique()); auto maskMap = sharedState->getPathNodeMaskMap(); - KU_ASSERT(extend.getNumChildren() == 1); + RYU_ASSERT(extend.getNumChildren() == 1); auto logicalRoot = extend.getChild(0); - KU_ASSERT(logicalRoot->getNumChildren() == 1 && + RYU_ASSERT(logicalRoot->getNumChildren() == 1 && logicalRoot->getChild(0)->getOperatorType() == LogicalOperatorType::SEMI_MASKER); auto logicalSemiMasker = logicalRoot->getChild(0)->ptrCast(); logicalSemiMasker->addTarget(logicalOperator); diff --git a/src/processor/map/map_scan_node_table.cpp b/src/processor/map/map_scan_node_table.cpp index 1200650293..b9b4954698 100644 --- a/src/processor/map/map_scan_node_table.cpp +++ b/src/processor/map/map_scan_node_table.cpp @@ -86,7 +86,7 @@ std::unique_ptr PlanMapper::mapScanNodeTable( std::move(evaluator), std::move(sharedState), getOperatorID(), std::move(printInfo)); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/processor/map/map_semi_masker.cpp b/src/processor/map/map_semi_masker.cpp index bb023e0692..5faa7776d7 100644 --- a/src/processor/map/map_semi_masker.cpp +++ b/src/processor/map/map_semi_masker.cpp @@ -20,7 +20,7 @@ namespace processor { static void initMask(table_id_map_t>& masksPerTable, const table_id_map_t& maskPerTable) { for (auto& [tableID, masks] : masksPerTable) { - KU_ASSERT(maskPerTable.contains(tableID)); + RYU_ASSERT(maskPerTable.contains(tableID)); auto mask = maskPerTable.at(tableID); mask->enable(); masks.emplace_back(mask); @@ -43,7 +43,7 @@ std::unique_ptr PlanMapper::mapSemiMasker( operatorNames.push_back(PhysicalOperatorUtils::operatorToString(physicalOp)); switch (physicalOp->getOperatorType()) { case PhysicalOperatorType::SCAN_NODE_TABLE: { - KU_ASSERT(semiMasker.getTargetType() == SemiMaskTargetType::SCAN_NODE); + RYU_ASSERT(semiMasker.getTargetType() == SemiMaskTargetType::SCAN_NODE); auto scan = physicalOp->ptrCast(); initMask(masksPerTable, scan->getSemiMasks()); } break; @@ -59,7 +59,7 @@ std::unique_ptr PlanMapper::mapSemiMasker( initMask(masksPerTable, tableFunc->getSharedState()->getSemiMasks()); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; case PhysicalOperatorType::RECURSIVE_EXTEND: { @@ -76,13 +76,13 @@ std::unique_ptr PlanMapper::mapSemiMasker( maskMap = sharedState->getPathNodeMaskMap(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } - KU_ASSERT(maskMap != nullptr); + RYU_ASSERT(maskMap != nullptr); initMask(masksPerTable, maskMap->getMasks()); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } auto keyPos = DataPos(inSchema->getExpressionPos(*semiMasker.getKey())); @@ -123,7 +123,7 @@ std::unique_ptr PlanMapper::mapSemiMasker( } } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/processor/map/map_set.cpp b/src/processor/map/map_set.cpp index 5a4f104ab0..f8da9dfa44 100644 --- a/src/processor/map/map_set.cpp +++ b/src/processor/map/map_set.cpp @@ -69,7 +69,7 @@ std::unique_ptr PlanMapper::getNodeSetExecutor( return std::make_unique(std::move(setInfo), std::move(tableInfos)); } - KU_ASSERT(node.getNumEntries() == 1); + RYU_ASSERT(node.getNumEntries() == 1); auto tableInfo = getNodeTableSetInfo(*node.getEntry(0), property, StorageManager::Get(*clientContext)); return std::make_unique(std::move(setInfo), std::move(tableInfo)); @@ -86,7 +86,7 @@ std::unique_ptr PlanMapper::mapSetProperty( return mapSetRelProperty(logicalOperator); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -140,7 +140,7 @@ std::unique_ptr PlanMapper::getRelSetExecutor(const BoundSetProp } return std::make_unique(std::move(info), std::move(tableInfos)); } - KU_ASSERT(rel.getNumEntries() == 1); + RYU_ASSERT(rel.getNumEntries() == 1); auto& relGroupEntry = rel.getEntry(0)->constCast(); auto fromToNodePair = relGroupEntry.getSingleRelEntryInfo().nodePair; auto tableInfo = getRelTableSetInfo(relGroupEntry, fromToNodePair.srcTableID, diff --git a/src/processor/map/map_simple.cpp b/src/processor/map/map_simple.cpp index 07f50c3d41..cfc5c224cb 100644 --- a/src/processor/map/map_simple.cpp +++ b/src/processor/map/map_simple.cpp @@ -64,7 +64,7 @@ static void exportDatabaseCollectParallelFlags(const std::unique_ptrgetChild(0)->ptrCast(); for (auto i = 1u; i < sink->getNumChildren(); ++i) { const auto& tableFuncCall = sink->getChild(i); - KU_ASSERT_UNCONDITIONAL( + RYU_ASSERT_UNCONDITIONAL( tableFuncCall->getChild(0)->getOperatorType() == PhysicalOperatorType::COPY_TO); const auto& [file, parallelFlag] = tableFuncCall->getChild(0)->ptrCast()->getParallelFlag(); @@ -77,7 +77,7 @@ std::unique_ptr PlanMapper::mapExportDatabase( auto exportDatabase = logicalOperator->constPtrCast(); auto fs = VirtualFileSystem::GetUnsafe(*clientContext); auto boundFileInfo = exportDatabase->getBoundFileInfo(); - KU_ASSERT(boundFileInfo->filePaths.size() == 1); + RYU_ASSERT(boundFileInfo->filePaths.size() == 1); auto filePath = boundFileInfo->filePaths[0]; if (fs->fileOrPathExists(filePath, clientContext)) { throw RuntimeException(stringFormat("Directory {} already exists.", filePath)); @@ -132,7 +132,7 @@ std::unique_ptr PlanMapper::mapExtension(const LogicalOperator std::move(printInfo)); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -144,7 +144,7 @@ std::unique_ptr PlanMapper::mapExtensionClause( return physicalOP; } } - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // namespace processor diff --git a/src/processor/map/map_table_function_call.cpp b/src/processor/map/map_table_function_call.cpp index 400c52c2ec..03d0d6df79 100644 --- a/src/processor/map/map_table_function_call.cpp +++ b/src/processor/map/map_table_function_call.cpp @@ -11,7 +11,7 @@ std::unique_ptr PlanMapper::mapTableFunctionCall( const LogicalOperator* logicalOperator) { auto& call = logicalOperator->constCast(); auto getPhysicalPlanFunc = call.getTableFunc().getPhysicalPlanFunc; - KU_ASSERT(getPhysicalPlanFunc); + RYU_ASSERT(getPhysicalPlanFunc); auto res = getPhysicalPlanFunc(this, logicalOperator); logicalOpToPhysicalOpMap.insert({logicalOperator, res.get()}); return res; diff --git a/src/processor/map/plan_mapper.cpp b/src/processor/map/plan_mapper.cpp index b2a3f08493..e2ccbfcc41 100644 --- a/src/processor/map/plan_mapper.cpp +++ b/src/processor/map/plan_mapper.cpp @@ -195,7 +195,7 @@ std::unique_ptr PlanMapper::mapOperator(const LogicalOperator* physicalOperator = mapExtensionClause(logicalOperator); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } if (!logicalOpToPhysicalOpMap.contains(logicalOperator)) { logicalOpToPhysicalOpMap.insert({logicalOperator, physicalOperator.get()}); diff --git a/src/processor/operator/aggregate/aggregate_hash_table.cpp b/src/processor/operator/aggregate/aggregate_hash_table.cpp index f7eed17f05..49377ee9d4 100644 --- a/src/processor/operator/aggregate/aggregate_hash_table.cpp +++ b/src/processor/operator/aggregate/aggregate_hash_table.cpp @@ -31,7 +31,7 @@ AggregateHashTable::AggregateHashTable(MemoryManager& memoryManager, : BaseHashTable{memoryManager, std::move(keyTypes)}, payloadTypes{std::move(payloadTypes)} { initializeFT(aggregateFunctions, std::move(tableSchema)); initializeHashTable(numEntriesToAllocate); - KU_ASSERT(aggregateFunctions.size() == distinctAggKeyTypes.size()); + RYU_ASSERT(aggregateFunctions.size() == distinctAggKeyTypes.size()); distinctHashTables.reserve(this->aggregateFunctions.size()); distinctHashEntriesProcessed.resize(this->aggregateFunctions.size()); for (auto i = 0u; i < this->aggregateFunctions.size(); ++i) { @@ -64,7 +64,7 @@ hash_t getHash(const FactorizedTable& table, ft_tuple_idx_t tupleIdx) { } void AggregateHashTable::merge(FactorizedTable&& table) { - KU_ASSERT(*table.getTableSchema() == *getTableSchema()); + RYU_ASSERT(*table.getTableSchema() == *getTableSchema()); resizeHashTableIfNecessary(table.getNumTuples()); uint64_t startTupleIdx = 0; @@ -151,7 +151,7 @@ void AggregateHashTable::mergeDistinctAggregateInfo() { vectorPtrs.size() - 1), 1, 0) == 0; }); - KU_ASSERT(entry != nullptr); + RYU_ASSERT(entry != nullptr); aggregateFunctions[distinctIdx].updatePosState(entry + aggStateColOffset, vectors.back().get() /*aggregateVector*/, 1 /* Distinct aggregate should ignore multiplicity since they are known to @@ -330,7 +330,7 @@ void AggregateHashTable::initializeFTEntries(const FactorizedTable& sourceTable, uint64_t AggregateHashTable::matchUnFlatVecWithFTColumn(const ValueVector* vector, uint64_t numMayMatches, uint64_t& numNoMatches, uint32_t colIdx) { - KU_ASSERT(!vector->state->isFlat()); + RYU_ASSERT(!vector->state->isFlat()); auto& schema = *getTableSchema(); auto colOffset = schema.getColOffset(colIdx); uint64_t mayMatchIdx = 0; @@ -377,7 +377,7 @@ uint64_t AggregateHashTable::matchUnFlatVecWithFTColumn(const ValueVector* vecto uint64_t AggregateHashTable::matchFlatVecWithFTColumn(const ValueVector* vector, uint64_t numMayMatches, uint64_t& numNoMatches, uint32_t colIdx) { - KU_ASSERT(vector->state->isFlat()); + RYU_ASSERT(vector->state->isFlat()); auto colOffset = getTableSchema()->getColOffset(colIdx); uint64_t mayMatchIdx = 0; auto pos = vector->state->getSelVector()[0]; @@ -406,7 +406,7 @@ uint64_t AggregateHashTable::matchFlatVecWithFTColumn(const ValueVector* vector, void AggregateHashTable::initializeFTEntryWithFlatVec(ValueVector* flatVector, uint64_t numEntriesToInitialize, uint32_t colIdx) { - KU_ASSERT(flatVector->state->isFlat()); + RYU_ASSERT(flatVector->state->isFlat()); auto colOffset = getTableSchema()->getColOffset(colIdx); auto pos = flatVector->state->getSelVector()[0]; if (flatVector->isNull(pos)) { @@ -428,7 +428,7 @@ void AggregateHashTable::initializeFTEntryWithFlatVec(ValueVector* flatVector, void AggregateHashTable::initializeFTEntryWithUnFlatVec(ValueVector* unFlatVector, uint64_t numEntriesToInitialize, uint32_t colIdx) { - KU_ASSERT(!unFlatVector->state->isFlat()); + RYU_ASSERT(!unFlatVector->state->isFlat()); auto colOffset = factorizedTable->getTableSchema()->getColOffset(colIdx); if (unFlatVector->hasNoNullsGuarantee()) { for (auto i = 0u; i < numEntriesToInitialize; i++) { @@ -504,7 +504,7 @@ void AggregateHashTable::findHashSlots(const std::vector& keyVecto const std::vector& dependentKeyVectors, const DataChunkState* leadingState) { initTmpHashSlotsAndIdxes(); auto numEntriesToFindHashSlots = leadingState->getSelSize(); - KU_ASSERT(getNumEntries() + numEntriesToFindHashSlots < maxNumHashSlots); + RYU_ASSERT(getNumEntries() + numEntriesToFindHashSlots < maxNumHashSlots); while (numEntriesToFindHashSlots > 0) { uint64_t numFTEntriesToUpdate = 0; uint64_t numMayMatches = 0; @@ -525,7 +525,7 @@ void AggregateHashTable::findHashSlots(const std::vector& keyVecto initializeFTEntries(keyVectors, dependentKeyVectors, numFTEntriesToUpdate); numNoMatches = matchFTEntries(constSpan(keyVectors), numMayMatches, numNoMatches); increaseHashSlotIdxes(numNoMatches); - KU_ASSERT(numNoMatches <= numEntriesToFindHashSlots); + RYU_ASSERT(numNoMatches <= numEntriesToFindHashSlots); numEntriesToFindHashSlots = numNoMatches; memcpy(tmpValueIdxes.get(), noMatchIdxes.get(), numNoMatches * sizeof(uint64_t)); } @@ -534,7 +534,7 @@ void AggregateHashTable::findHashSlots(const std::vector& keyVecto void AggregateHashTable::findHashSlots(const FactorizedTable& srcTable, uint64_t startOffset, uint64_t numEntriesToFindHashSlots) { initTmpHashSlotsAndIdxes(srcTable, startOffset, numEntriesToFindHashSlots); - KU_ASSERT(getNumEntries() + numEntriesToFindHashSlots < maxNumHashSlots); + RYU_ASSERT(getNumEntries() + numEntriesToFindHashSlots < maxNumHashSlots); while (numEntriesToFindHashSlots > 0) { uint64_t numFTEntriesToUpdate = 0; uint64_t numMayMatches = 0; @@ -555,7 +555,7 @@ void AggregateHashTable::findHashSlots(const FactorizedTable& srcTable, uint64_t initializeFTEntries(srcTable, startOffset, numFTEntriesToUpdate); numNoMatches = matchFTEntries(srcTable, startOffset, numMayMatches, numNoMatches); increaseHashSlotIdxes(numNoMatches); - KU_ASSERT(numNoMatches <= numEntriesToFindHashSlots); + RYU_ASSERT(numNoMatches <= numEntriesToFindHashSlots); numEntriesToFindHashSlots = numNoMatches; memcpy(tmpValueIdxes.get(), noMatchIdxes.get(), numNoMatches * sizeof(uint64_t)); } @@ -779,7 +779,7 @@ uint64_t PartitioningAggregateHashTable::append(const std::vector& // mergeAll makes use of the hashVector, so it needs to be called before computeVectorHashes computeVectorHashes(keyVectors); - KU_ASSERT( + RYU_ASSERT( hashVector->getSelVectorPtr()->getSelSize() == leadingState->getSelVector().getSelSize()); findHashSlots(keyVectors, dependentKeyVectors, leadingState); // Don't update distinct states since they can't be merged into the global hash tables. diff --git a/src/processor/operator/aggregate/base_aggregate.cpp b/src/processor/operator/aggregate/base_aggregate.cpp index 06c81b9a10..ea0ad6e398 100644 --- a/src/processor/operator/aggregate/base_aggregate.cpp +++ b/src/processor/operator/aggregate/base_aggregate.cpp @@ -54,7 +54,7 @@ BaseAggregateSharedState::HashTableQueue::~HashTableQueue() { void BaseAggregateSharedState::HashTableQueue::appendTuple(std::span tuple) { while (true) { auto* block = headBlock.load(); - KU_ASSERT(tuple.size() == block->table.getTableSchema()->getNumBytesPerTuple()); + RYU_ASSERT(tuple.size() == block->table.getTableSchema()->getNumBytesPerTuple()); auto posToWrite = block->numTuplesReserved++; if (posToWrite < numTuplesPerBlock) { memcpy(block->table.getTuple(posToWrite), tuple.data(), tuple.size()); @@ -81,9 +81,9 @@ void BaseAggregateSharedState::HashTableQueue::appendTuple(std::span tu void BaseAggregateSharedState::HashTableQueue::mergeInto(AggregateHashTable& hashTable) { TupleBlock* partitionToMerge = nullptr; auto headBlock = this->headBlock.load(); - KU_ASSERT(headBlock != nullptr); + RYU_ASSERT(headBlock != nullptr); while (queuedTuples.pop(partitionToMerge)) { - KU_ASSERT( + RYU_ASSERT( partitionToMerge->numTuplesWritten == partitionToMerge->table.getNumTuplesPerBlock()); hashTable.merge(std::move(partitionToMerge->table)); delete partitionToMerge; diff --git a/src/processor/operator/aggregate/hash_aggregate.cpp b/src/processor/operator/aggregate/hash_aggregate.cpp index f0dde6f1e1..d9e81b89c5 100644 --- a/src/processor/operator/aggregate/hash_aggregate.cpp +++ b/src/processor/operator/aggregate/hash_aggregate.cpp @@ -183,20 +183,20 @@ void HashAggregateSharedState::scan(std::span entries, auto [table, tableStartOffset] = getPartitionForOffset(startOffset); // Due to the way FactorizedTable::lookup works, it's necessary to read one partition // at a time. - KU_ASSERT(startOffset - tableStartOffset + numTuplesToScan <= table->getNumTuples()); + RYU_ASSERT(startOffset - tableStartOffset + numTuplesToScan <= table->getNumTuples()); for (size_t pos = 0; pos < numTuplesToScan; pos++) { auto posInTable = startOffset + pos - tableStartOffset; entries[pos] = table->getTuple(posInTable); } table->lookup(keyVectors, columnIndices, entries.data(), 0, numTuplesToScan); - KU_ASSERT(true); + RYU_ASSERT(true); } void HashAggregateSharedState::assertFinalized() const { RUNTIME_CHECK(for (const auto& partition : globalPartitions) { - KU_ASSERT(partition.finalized); - KU_ASSERT(partition.queue->empty()); + RYU_ASSERT(partition.finalized); + RYU_ASSERT(partition.queue->empty()); }); } diff --git a/src/processor/operator/aggregate/simple_aggregate.cpp b/src/processor/operator/aggregate/simple_aggregate.cpp index 42207ec710..f659198a1b 100644 --- a/src/processor/operator/aggregate/simple_aggregate.cpp +++ b/src/processor/operator/aggregate/simple_aggregate.cpp @@ -80,7 +80,7 @@ SimpleAggregateSharedState::SimpleAggregateSharedState(main::ClientContext* cont void SimpleAggregateSharedState::combineAggregateStates( const std::vector>& localAggregateStates, common::InMemOverflowBuffer&& localOverflowBuffer) { - KU_ASSERT(localAggregateStates.size() == globalAggregateStates.size()); + RYU_ASSERT(localAggregateStates.size() == globalAggregateStates.size()); std::unique_lock lck{mtx}; for (auto i = 0u; i < aggregateFunctions.size(); ++i) { // Distinct functions will be combined accross the partitions in @@ -122,7 +122,7 @@ std::pair SimpleAggregateSharedState::getNextRangeToRead() { void SimpleAggregateSharedState::SimpleAggregatePartitioningData::appendTuples( const FactorizedTable& factorizedTable, ft_col_offset_t hashOffset) { - KU_ASSERT(sharedState->globalPartitions.size() > 0); + RYU_ASSERT(sharedState->globalPartitions.size() > 0); auto numBytesPerTuple = factorizedTable.getTableSchema()->getNumBytesPerTuple(); for (ft_tuple_idx_t tupleIdx = 0; tupleIdx < factorizedTable.getNumTuples(); tupleIdx++) { auto tuple = factorizedTable.getTuple(tupleIdx); @@ -138,7 +138,7 @@ void SimpleAggregateSharedState::SimpleAggregatePartitioningData::appendTuples( // LCOV_EXCL_START void SimpleAggregateSharedState::SimpleAggregatePartitioningData::appendDistinctTuple(size_t, std::span, common::hash_t) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } // LCOV_EXCL_END @@ -161,7 +161,7 @@ void SimpleAggregateSharedState::finalizePartitions(storage::MemoryManager* memo } auto& [hashTable, queue, state] = partition.distinctTables[i]; if (queue) { - KU_ASSERT(hashTable); + RYU_ASSERT(hashTable); queue->mergeInto(*hashTable); } @@ -267,7 +267,7 @@ void SimpleAggregateFinalize::finalizeInternal(ExecutionContext* /*context*/) { } void SimpleAggregateFinalize::executeInternal(ExecutionContext* context) { - KU_ASSERT(sharedState->isReadyForFinalization()); + RYU_ASSERT(sharedState->isReadyForFinalization()); sharedState->finalizePartitions(storage::MemoryManager::Get(*context->clientContext), aggInfos); } diff --git a/src/processor/operator/aggregate/simple_aggregate_scan.cpp b/src/processor/operator/aggregate/simple_aggregate_scan.cpp index d8bfebdf38..c510669749 100644 --- a/src/processor/operator/aggregate/simple_aggregate_scan.cpp +++ b/src/processor/operator/aggregate/simple_aggregate_scan.cpp @@ -5,11 +5,11 @@ namespace processor { void SimpleAggregateScan::initLocalStateInternal(ResultSet* resultSet, ExecutionContext* context) { BaseAggregateScan::initLocalStateInternal(resultSet, context); - KU_ASSERT(!scanInfo.aggregatesPos.empty()); + RYU_ASSERT(!scanInfo.aggregatesPos.empty()); auto outDataChunkPos = scanInfo.aggregatesPos[0].dataChunkPos; RUNTIME_CHECK({ for (auto& dataPos : scanInfo.aggregatesPos) { - KU_ASSERT(dataPos.dataChunkPos == outDataChunkPos); + RYU_ASSERT(dataPos.dataChunkPos == outDataChunkPos); } }); outDataChunk = resultSet->dataChunks[outDataChunkPos].get(); @@ -21,12 +21,12 @@ bool SimpleAggregateScan::getNextTuplesInternal(ExecutionContext* /*context*/) { return false; } // Output of simple aggregate is guaranteed to be a single value for each aggregate. - KU_ASSERT(startOffset == 0 && endOffset == 1); + RYU_ASSERT(startOffset == 0 && endOffset == 1); for (auto i = 0u; i < aggregateVectors.size(); i++) { scanInfo.moveAggResultToVectorFuncs[i](*aggregateVectors[i], 0 /* position to write */, sharedState->getAggregateState(i)); } - KU_ASSERT(!scanInfo.aggregatesPos.empty()); + RYU_ASSERT(!scanInfo.aggregatesPos.empty()); outDataChunk->state->initOriginalAndSelectedSize(1); metrics->numOutputTuple.increase(outDataChunk->state->getSelVector().getSelSize()); return true; diff --git a/src/processor/operator/arrow_result_collector.cpp b/src/processor/operator/arrow_result_collector.cpp index c6937d4729..1fdf0b3f50 100644 --- a/src/processor/operator/arrow_result_collector.cpp +++ b/src/processor/operator/arrow_result_collector.cpp @@ -20,7 +20,7 @@ bool ArrowResultCollectorLocalState::advance() { } void ArrowResultCollectorLocalState::fillTuple() { - KU_ASSERT(tuple->len() == vectors.size()); + RYU_ASSERT(tuple->len() == vectors.size()); for (auto i = 0u; i < vectors.size(); ++i) { auto vector = vectors[i]; auto pos = vector->state->getSelVector()[vectorsSelPos[i]]; diff --git a/src/processor/operator/base_partitioner_shared_state.cpp b/src/processor/operator/base_partitioner_shared_state.cpp index aab587cfac..fc951202ac 100644 --- a/src/processor/operator/base_partitioner_shared_state.cpp +++ b/src/processor/operator/base_partitioner_shared_state.cpp @@ -6,7 +6,7 @@ namespace ryu::processor { void PartitionerSharedState::initialize(const common::logical_type_vec_t&, common::idx_t numPartitioners, const main::ClientContext* clientContext) { - KU_ASSERT(numPartitioners >= 1 && numPartitioners <= DIRECTIONS); + RYU_ASSERT(numPartitioners >= 1 && numPartitioners <= DIRECTIONS); auto transaction = transaction::Transaction::Get(*clientContext); numNodes[0] = srcNodeTable->getNumTotalRows(transaction); if (numPartitioners > 1) { diff --git a/src/processor/operator/ddl/alter.cpp b/src/processor/operator/ddl/alter.cpp index cd1a986637..07bc87d1f4 100644 --- a/src/processor/operator/ddl/alter.cpp +++ b/src/processor/operator/ddl/alter.cpp @@ -47,7 +47,7 @@ static void validate(ConflictAction action, const on_conflict_throw_action& thro case ConflictAction::ON_CONFLICT_DO_NOTHING: break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -88,7 +88,7 @@ static bool skipAlter(ConflictAction action, const skip_alter_on_conflict& skipA case ConflictAction::ON_CONFLICT_DO_NOTHING: return skipAlterOnConflict(); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -288,7 +288,7 @@ void Alter::alterTable(main::ClientContext* clientContext, const TableCatalogEnt appendMessage(stringFormat("Comment added to table {}.", tableName), memoryManager); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } // Handle storage changes @@ -300,7 +300,7 @@ void Alter::alterTable(main::ClientContext* clientContext, const TableCatalogEnt switch (info.alterType) { case AlterType::ADD_PROPERTY: { auto& boundAddPropInfo = info.extraInfo->constCast(); - KU_ASSERT(defaultValueEvaluator); + RYU_ASSERT(defaultValueEvaluator); auto* alteredEntry = catalog->getTableCatalogEntry(transaction, alterInfo.tableName); auto& addedProp = alteredEntry->getProperty(boundAddPropInfo.propertyDefinition.getName()); storage::TableAddColumnState state{addedProp, *defaultValueEvaluator}; @@ -317,7 +317,7 @@ void Alter::alterTable(main::ClientContext* clientContext, const TableCatalogEnt } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } break; @@ -335,7 +335,7 @@ void Alter::alterTable(main::ClientContext* clientContext, const TableCatalogEnt } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } break; diff --git a/src/processor/operator/ddl/create_table.cpp b/src/processor/operator/ddl/create_table.cpp index 22df3b8324..fd877b88ff 100644 --- a/src/processor/operator/ddl/create_table.cpp +++ b/src/processor/operator/ddl/create_table.cpp @@ -28,7 +28,7 @@ void CreateTable::executeInternal(ExecutionContext* context) { throw BinderException(info.tableName + " already exists in catalog."); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } // Create the table. @@ -39,7 +39,7 @@ void CreateTable::executeInternal(ExecutionContext* context) { entry = catalog->createTableEntry(transaction, info); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } storage::StorageManager::Get(*clientContext)->createTable(entry->ptrCast()); appendMessage(stringFormat("Table {} has been created.", info.tableName), memoryManager); diff --git a/src/processor/operator/ddl/drop.cpp b/src/processor/operator/ddl/drop.cpp index 274a1ad828..2d937bd057 100644 --- a/src/processor/operator/ddl/drop.cpp +++ b/src/processor/operator/ddl/drop.cpp @@ -29,7 +29,7 @@ void Drop::executeInternal(ExecutionContext* context) { dropMacro(clientContext); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -48,7 +48,7 @@ void Drop::dropSequence(const main::ClientContext* context) { throw BinderException(message); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } catalog->dropSequence(transaction, dropInfo.name); @@ -70,7 +70,7 @@ void Drop::dropTable(const main::ClientContext* context) { throw BinderException(message); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } auto entry = catalog->getTableCatalogEntry(transaction, dropInfo.name); @@ -95,7 +95,7 @@ void Drop::dropTable(const main::ClientContext* context) { // Do nothing } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } catalog->dropTableEntryAndIndex(transaction, dropInfo.name); appendMessage(stringFormat("Table {} has been dropped.", dropInfo.name), memoryManager); @@ -125,7 +125,7 @@ void Drop::handleMacroExistence(const main::ClientContext* context) { throw BinderException(message); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/processor/operator/hash_join/hash_join_build.cpp b/src/processor/operator/hash_join/hash_join_build.cpp index f33b89a87d..432b64d6f1 100644 --- a/src/processor/operator/hash_join/hash_join_build.cpp +++ b/src/processor/operator/hash_join/hash_join_build.cpp @@ -49,7 +49,7 @@ void HashJoinBuild::setKeyState(common::DataChunkState* state) { if (keyState == nullptr) { keyState = state; } else { - KU_ASSERT(keyState == state); // two pointers should be pointing to the same state + RYU_ASSERT(keyState == state); // two pointers should be pointing to the same state } } diff --git a/src/processor/operator/hash_join/hash_join_probe.cpp b/src/processor/operator/hash_join/hash_join_probe.cpp index 135b414ee7..2ccb8e876d 100644 --- a/src/processor/operator/hash_join/hash_join_probe.cpp +++ b/src/processor/operator/hash_join/hash_join_probe.cpp @@ -30,7 +30,7 @@ void HashJoinProbe::initLocalStateInternal(ResultSet* resultSet, ExecutionContex } // We only need to read nonKeys from the factorizedTable. Key columns are always kept as first k // columns in the factorizedTable, so we skip the first k columns. - KU_ASSERT(probeDataInfo.keysDataPos.size() + probeDataInfo.getNumPayloads() + 2 == + RYU_ASSERT(probeDataInfo.keysDataPos.size() + probeDataInfo.getNumPayloads() + 2 == sharedState->getHashTable()->getTableSchema()->getNumColumns()); columnIdxsToReadFrom.resize(probeDataInfo.getNumPayloads()); iota(columnIdxsToReadFrom.begin(), columnIdxsToReadFrom.end(), @@ -67,7 +67,7 @@ bool HashJoinProbe::getMatchedTuplesForFlatKey(ExecutionContext* context) { } bool HashJoinProbe::getMatchedTuplesForUnFlatKey(ExecutionContext* context) { - KU_ASSERT(keyVectors.size() == 1); + RYU_ASSERT(keyVectors.size() == 1); auto keyVector = keyVectors[0]; restoreSelVector(*keyVector->state); if (!children[0]->getNextTuple(context)) { @@ -119,7 +119,7 @@ static void writeLeftJoinMarkVector(ValueVector* markVector, bool flag) { if (markVector == nullptr) { return; } - KU_ASSERT(markVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(markVector->state->getSelVector().getSelSize() == 1); auto pos = markVector->state->getSelVector()[0]; markVector->setValue(pos, flag); } @@ -133,7 +133,7 @@ uint64_t HashJoinProbe::getLeftJoinResult() { // clear, NULL keys should only be discarded for probe but should not reflect on the vector. // The following for loop is a temporary hack. for (auto& vector : keyVectors) { - KU_ASSERT(vector->state->isFlat()); + RYU_ASSERT(vector->state->isFlat()); vector->state->getSelVectorUnsafe().setSelSize(1); } probeState->probedTuples[0] = nullptr; @@ -145,7 +145,7 @@ uint64_t HashJoinProbe::getLeftJoinResult() { } uint64_t HashJoinProbe::getCountJoinResult() { - KU_ASSERT(vectorsToReadInto.size() == 1); + RYU_ASSERT(vectorsToReadInto.size() == 1); if (getInnerJoinResult() == 0) { auto pos = vectorsToReadInto[0]->state->getSelVector()[0]; vectorsToReadInto[0]->setValue(pos, 0); diff --git a/src/processor/operator/hash_join/join_hash_table.cpp b/src/processor/operator/hash_join/join_hash_table.cpp index 7f807da37a..520610b8ad 100644 --- a/src/processor/operator/hash_join/join_hash_table.cpp +++ b/src/processor/operator/hash_join/join_hash_table.cpp @@ -75,7 +75,7 @@ static void sortSelectedPos(ValueVector* nodeIDVector) { uint64_t JoinHashTable::appendVectorWithSorting(ValueVector* keyVector, std::vector payloadVectors) { auto numTuplesToAppend = 1; - KU_ASSERT(keyVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(keyVector->state->getSelVector().getSelSize() == 1); // Based on the way we are planning, we assume that the first and second vectors are both // nodeIDs from extending, while the first one is key, and the second one is payload. auto payloadNodeIDVector = payloadVectors[0]; @@ -86,7 +86,7 @@ uint64_t JoinHashTable::appendVectorWithSorting(ValueVector* keyVector, } // A single appendInfo will return from `allocateFlatTupleBlocks` when numTuplesToAppend is 1. auto appendInfos = factorizedTable->allocateFlatTupleBlocks(numTuplesToAppend); - KU_ASSERT(appendInfos.size() == 1); + RYU_ASSERT(appendInfos.size() == 1); auto colIdx = 0u; std::vector keyVectors = {keyVector}; computeVectorHashes(keyVectors); @@ -128,7 +128,7 @@ void JoinHashTable::buildHashSlots() { void JoinHashTable::probe(const std::vector& keyVectors, ValueVector& hashVector, SelectionVector& hashSelVec, ValueVector* tmpHashResultVector, uint8_t** probedTuples) { - KU_ASSERT(keyVectors.size() == keyTypes.size()); + RYU_ASSERT(keyVectors.size() == keyTypes.size()); if (getNumEntries() == 0) { return; } @@ -146,7 +146,7 @@ void JoinHashTable::probe(const std::vector& keyVectors, ValueVect hashVector, hashSelVec); } for (auto i = 0u; i < hashSelVec.getSelSize(); i++) { - KU_ASSERT(i < DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(i < DEFAULT_VECTOR_CAPACITY); probedTuples[i] = getTupleForHash(hashVector.getValue(hashSelVec[i])); } } diff --git a/src/processor/operator/index_lookup.cpp b/src/processor/operator/index_lookup.cpp index 91bbcba428..a34193aee0 100644 --- a/src/processor/operator/index_lookup.cpp +++ b/src/processor/operator/index_lookup.cpp @@ -76,7 +76,7 @@ template void fillOffsetArraysFromVector(transaction::Transaction* transaction, const IndexLookupInfo& info, ValueVector* keyVector, ValueVector* resultVector, const std::vector& warningDataVectors, BatchInsertErrorHandler* errorHandler) { - KU_ASSERT(resultVector->dataType.getPhysicalType() == PhysicalTypeID::INT64); + RYU_ASSERT(resultVector->dataType.getPhysicalType() == PhysicalTypeID::INT64); TypeUtils::visit( keyVector->dataType.getPhysicalType(), [&](T) { @@ -110,7 +110,7 @@ void fillOffsetArraysFromVector(transaction::Transaction* transaction, const Ind } } }, - [&](auto) { KU_UNREACHABLE; }); + [&](auto) { RYU_UNREACHABLE; }); } } // namespace diff --git a/src/processor/operator/intersect/intersect.cpp b/src/processor/operator/intersect/intersect.cpp index 6af1e421db..c477e27784 100644 --- a/src/processor/operator/intersect/intersect.cpp +++ b/src/processor/operator/intersect/intersect.cpp @@ -44,7 +44,7 @@ void Intersect::probeHTs() { std::vector> flatTuples(probeKeyVectors.size()); hash_t hashVal = 0; for (auto i = 0u; i < probeKeyVectors.size(); i++) { - KU_ASSERT(probeKeyVectors[i]->state->isFlat()); + RYU_ASSERT(probeKeyVectors[i]->state->isFlat()); probedFlatTuples[i].clear(); if (sharedHTs[i]->getHashTable()->getNumEntries() == 0) { continue; @@ -64,7 +64,7 @@ void Intersect::probeHTs() { void Intersect::twoWayIntersect(nodeID_t* leftNodeIDs, SelectionVector& lSelVector, nodeID_t* rightNodeIDs, SelectionVector& rSelVector) { - KU_ASSERT(lSelVector.getSelSize() <= rSelVector.getSelSize()); + RYU_ASSERT(lSelVector.getSelSize() <= rSelVector.getSelSize()); auto leftPositionBuffer = lSelVector.getMutableBuffer(); auto rightPositionBuffer = rSelVector.getMutableBuffer(); sel_t leftPosition = 0, rightPosition = 0; @@ -101,7 +101,7 @@ static std::vector fetchListsToIntersectFromTuples( } static std::vector swapSmallestListToFront(std::vector& lists) { - KU_ASSERT(lists.size() >= 2); + RYU_ASSERT(lists.size() >= 2); std::vector listIdxes(lists.size()); iota(listIdxes.begin(), listIdxes.end(), 0); uint32_t smallestListIdx = 0; @@ -134,7 +134,7 @@ void Intersect::intersectLists(const std::vector& listsToInter outKeyVector->state->getSelVectorUnsafe().setSelSize(0); return; } - KU_ASSERT(listsToIntersect[0].numElements <= DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(listsToIntersect[0].numElements <= DEFAULT_VECTOR_CAPACITY); memcpy(outKeyVector->getData(), listsToIntersect[0].value, listsToIntersect[0].numElements * sizeof(nodeID_t)); SelectionVector lSelVector(listsToIntersect[0].numElements); diff --git a/src/processor/operator/limit.cpp b/src/processor/operator/limit.cpp index efa7af5da8..5900e9e579 100644 --- a/src/processor/operator/limit.cpp +++ b/src/processor/operator/limit.cpp @@ -25,7 +25,7 @@ bool Limit::getNextTuplesInternal(ExecutionContext* context) { // If all dataChunks are flat, numTupleAvailable = 1 which means numTupleProcessedBefore // = limitNumber. So execution is terminated in above if statement. auto& dataChunkToSelect = resultSet->dataChunks[dataChunkToSelectPos]; - KU_ASSERT(!dataChunkToSelect->state->isFlat()); + RYU_ASSERT(!dataChunkToSelect->state->isFlat()); dataChunkToSelect->state->getSelVectorUnsafe().setSelSize( numTupleToProcessInCurrentResultSet); metrics->numOutputTuple.increase(numTupleToProcessInCurrentResultSet); diff --git a/src/processor/operator/order_by/key_block_merger.cpp b/src/processor/operator/order_by/key_block_merger.cpp index 16baed4b96..b6c07b10ac 100644 --- a/src/processor/operator/order_by/key_block_merger.cpp +++ b/src/processor/operator/order_by/key_block_merger.cpp @@ -32,7 +32,7 @@ MergedKeyBlocks::MergedKeyBlocks(uint32_t numBytesPerTuple, std::shared_ptr KeyBlockMergeTask::getMorsel() { } void KeyBlockMerger::mergeKeyBlocks(KeyBlockMergeMorsel& keyBlockMergeMorsel) const { - KU_ASSERT(keyBlockMergeMorsel.leftKeyBlockStartIdx < keyBlockMergeMorsel.leftKeyBlockEndIdx || + RYU_ASSERT(keyBlockMergeMorsel.leftKeyBlockStartIdx < keyBlockMergeMorsel.leftKeyBlockEndIdx || keyBlockMergeMorsel.rightKeyBlockStartIdx < keyBlockMergeMorsel.rightKeyBlockEndIdx); auto leftBlockPtrInfo = BlockPtrInfo(keyBlockMergeMorsel.leftKeyBlockStartIdx, @@ -315,7 +315,7 @@ void KeyBlockMergeTaskDispatcher::init(MemoryManager* memoryManager, std::queue>* sortedKeyBlocks, std::vector factorizedTables, std::vector& strKeyColsInfo, uint64_t numBytesPerTuple) { - KU_ASSERT(this->keyBlockMerger == nullptr); + RYU_ASSERT(this->keyBlockMerger == nullptr); this->memoryManager = memoryManager; this->sortedKeyBlocks = sortedKeyBlocks; this->keyBlockMerger = std::make_unique(std::move(factorizedTables), diff --git a/src/processor/operator/order_by/order_by_key_encoder.cpp b/src/processor/operator/order_by/order_by_key_encoder.cpp index 778a509302..cc0dc63df2 100644 --- a/src/processor/operator/order_by/order_by_key_encoder.cpp +++ b/src/processor/operator/order_by/order_by_key_encoder.cpp @@ -26,7 +26,7 @@ OrderByKeyEncoder::OrderByKeyEncoder(const OrderByDataInfo& orderByDataInfo, "The number of tuples per block of factorizedTable exceeds the maximum blockOffset!"); } keyBlocks.emplace_back(std::make_unique(memoryManager, DATA_BLOCK_SIZE)); - KU_ASSERT(this->numBytesPerTuple == getNumBytesPerTuple()); + RYU_ASSERT(this->numBytesPerTuple == getNumBytesPerTuple()); maxNumTuplesPerBlock = DATA_BLOCK_SIZE / numBytesPerTuple; if (maxNumTuplesPerBlock <= 0) { throw RuntimeException( @@ -264,7 +264,7 @@ void OrderByKeyEncoder::getEncodingFunction(PhysicalTypeID physicalType, encode_ return; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/processor/operator/order_by/top_k.cpp b/src/processor/operator/order_by/top_k.cpp index 9dc5c01714..a266c98ff3 100644 --- a/src/processor/operator/order_by/top_k.cpp +++ b/src/processor/operator/order_by/top_k.cpp @@ -156,7 +156,7 @@ void TopKBuffer::getSelectComparisonFunction(common::PhysicalTypeID typeID, typeID, [&selectFunc]( T) { selectFunc = function::BinaryFunctionExecutor::selectComparison; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } void TopKBuffer::initCompareFuncs() { @@ -202,7 +202,7 @@ bool TopKBuffer::compareBoundaryValue(const std::vector& k } bool TopKBuffer::compareFlatKeys(idx_t vectorIdxToCompare, std::vector keyVectors) { - KU_ASSERT(!keyVectors.empty()); + RYU_ASSERT(!keyVectors.empty()); auto selVector = std::make_shared(common::DEFAULT_VECTOR_CAPACITY); selVector->setToFiltered(); diff --git a/src/processor/operator/partitioner.cpp b/src/processor/operator/partitioner.cpp index 0d95c3d749..c3663aa179 100644 --- a/src/processor/operator/partitioner.cpp +++ b/src/processor/operator/partitioner.cpp @@ -20,7 +20,7 @@ std::string PartitionerPrintInfo::toString() const { } void PartitionerFunctions::partitionRelData(ValueVector* key, ValueVector* partitionIdxes) { - KU_ASSERT(key->state == partitionIdxes->state && + RYU_ASSERT(key->state == partitionIdxes->state && key->dataType.getPhysicalType() == PhysicalTypeID::INT64); for (auto i = 0u; i < key->state->getSelVector().getSelSize(); i++) { const auto pos = key->state->getSelVector()[i]; @@ -40,7 +40,7 @@ void CopyPartitionerSharedState::initialize(const logical_type_vec_t& columnType void CopyPartitionerSharedState::merge( const std::vector>& localPartitioningStates) { std::unique_lock xLck{mtx}; - KU_ASSERT(partitioningBuffers.size() == localPartitioningStates.size()); + RYU_ASSERT(partitioningBuffers.size() == localPartitioningStates.size()); for (auto partitioningIdx = 0u; partitioningIdx < partitioningBuffers.size(); partitioningIdx++) { partitioningBuffers[partitioningIdx]->merge(*localPartitioningStates[partitioningIdx]); @@ -53,7 +53,7 @@ void CopyPartitionerSharedState::resetState(common::idx_t partitioningIdx) { } void PartitioningBuffer::merge(const PartitioningBuffer& localPartitioningState) const { - KU_ASSERT(partitions.size() == localPartitioningState.partitions.size()); + RYU_ASSERT(partitions.size() == localPartitioningState.partitions.size()); for (auto partitionIdx = 0u; partitionIdx < partitions.size(); partitionIdx++) { auto& sharedPartition = partitions[partitionIdx]; auto& localPartition = localPartitioningState.partitions[partitionIdx]; @@ -129,7 +129,7 @@ void Partitioner::initializePartitioningStates(const logical_type_vec_t& columnT void Partitioner::executeInternal(ExecutionContext* context) { const auto relOffsetVector = resultSet->getValueVector(info.relOffsetDataPos); while (children[0]->getNextTuple(context)) { - KU_ASSERT(dataInfo.columnEvaluators.size() >= 1); + RYU_ASSERT(dataInfo.columnEvaluators.size() >= 1); const auto numRels = relOffsetVector->state->getSelVector().getSelSize(); evaluateExpressions(numRels); auto currentRelOffset = sharedState->relTable->reserveRelOffsets(numRels); @@ -174,7 +174,7 @@ void Partitioner::copyDataToPartitions(MemoryManager& memoryManager, for (auto i = 0u; i < chunkToCopyFrom.state->getSelVector().getSelSize(); i++) { const auto posToCopyFrom = chunkToCopyFrom.state->getSelVector()[i]; const auto partitionIdx = partitionIdxes->getValue(posToCopyFrom); - KU_ASSERT( + RYU_ASSERT( partitionIdx < localState->getPartitioningBuffer(partitioningIdx)->partitions.size()); const auto& partition = localState->getPartitioningBuffer(partitioningIdx)->partitions[partitionIdx]; diff --git a/src/processor/operator/path_property_probe.cpp b/src/processor/operator/path_property_probe.cpp index cf050a8d7c..b9d125e01f 100644 --- a/src/processor/operator/path_property_probe.cpp +++ b/src/processor/operator/path_property_probe.cpp @@ -253,7 +253,7 @@ bool PathPropertyProbe::getNextTuplesInternal(ExecutionContext* context) { continue; } if (nodeListEntry.size == 0) { - KU_ASSERT(relListEntry.size == 1); + RYU_ASSERT(relListEntry.size == 1); if (isCorrectOrder(directionDataVector, relListEntry.offset, info.extendFromLeft)) { pathSrcNodeIDsDataVector->setValue(relListEntry.offset, leftNodeID); pathDstNodeIDsDataVector->setValue(relListEntry.offset, rightNodeID); @@ -281,7 +281,7 @@ bool PathPropertyProbe::getNextTuplesInternal(ExecutionContext* context) { } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } return true; } @@ -308,7 +308,7 @@ void PathPropertyProbe::probe(ryu::processor::JoinHashTable* hashTable, uint64_t } localState.probedTuples[i] = *hashTable->getPrevTuple(currentTuple); } - KU_ASSERT(localState.matchedTuples[i] != nullptr); + RYU_ASSERT(localState.matchedTuples[i] != nullptr); } // Scan table auto factorizedTable = hashTable->getFactorizedTable(); diff --git a/src/processor/operator/persistent/batch_insert_error_handler.cpp b/src/processor/operator/persistent/batch_insert_error_handler.cpp index 888875d74a..a7a45ac2e9 100644 --- a/src/processor/operator/persistent/batch_insert_error_handler.cpp +++ b/src/processor/operator/persistent/batch_insert_error_handler.cpp @@ -24,7 +24,7 @@ BatchInsertErrorHandler::BatchInsertErrorHandler(ExecutionContext* context, bool sharedErrorCounter(std::move(sharedErrorCounter)) {} void BatchInsertErrorHandler::addNewVectorsIfNeeded() { - KU_ASSERT(currentInsertIdx <= cachedErrors.size()); + RYU_ASSERT(currentInsertIdx <= cachedErrors.size()); if (currentInsertIdx == cachedErrors.size()) { cachedErrors.emplace_back(); } @@ -67,12 +67,12 @@ void BatchInsertErrorHandler::flushStoredErrors() { } if (!unpopulatedErrors.empty()) { - KU_ASSERT(ignoreErrors); + RYU_ASSERT(ignoreErrors); WarningContext::Get(*context->clientContext)->appendWarningMessages(unpopulatedErrors); } if (!unpopulatedErrors.empty() && sharedErrorCounter != nullptr) { - KU_ASSERT(sharedErrorCounterMtx); + RYU_ASSERT(sharedErrorCounterMtx); common::UniqLock lockGuard{*sharedErrorCounterMtx}; *sharedErrorCounter += unpopulatedErrors.size(); } diff --git a/src/processor/operator/persistent/copy_rel_batch_insert.cpp b/src/processor/operator/persistent/copy_rel_batch_insert.cpp index eff862f6d5..321512390d 100644 --- a/src/processor/operator/persistent/copy_rel_batch_insert.cpp +++ b/src/processor/operator/persistent/copy_rel_batch_insert.cpp @@ -8,7 +8,7 @@ namespace processor { static void setOffsetToWithinNodeGroup(storage::ColumnChunkData& chunk, common::offset_t startOffset) { - KU_ASSERT(chunk.getDataType().getPhysicalType() == common::PhysicalTypeID::INTERNAL_ID); + RYU_ASSERT(chunk.getDataType().getPhysicalType() == common::PhysicalTypeID::INTERNAL_ID); const auto offsets = reinterpret_cast(chunk.getData()); for (auto i = 0u; i < chunk.getNumValues(); i++) { offsets[i] -= startOffset; @@ -33,7 +33,7 @@ std::unique_ptr CopyRelBatchInsert::initExecutionS void CopyRelBatchInsert::populateCSRLengthsInternal(const storage::InMemChunkedCSRHeader& csrHeader, common::offset_t numNodes, storage::InMemChunkedNodeGroupCollection& partition, common::column_id_t boundNodeOffsetColumn) { - KU_ASSERT(numNodes == csrHeader.length->getNumValues() && + RYU_ASSERT(numNodes == csrHeader.length->getNumValues() && numNodes == csrHeader.offset->getNumValues()); const auto lengthData = reinterpret_cast(csrHeader.length->getData()); std::fill(lengthData, lengthData + numNodes, 0); @@ -41,7 +41,7 @@ void CopyRelBatchInsert::populateCSRLengthsInternal(const storage::InMemChunkedC auto& offsetChunk = chunkedGroup->getColumnChunk(boundNodeOffsetColumn); for (auto i = 0u; i < offsetChunk.getNumValues(); i++) { const auto nodeOffset = offsetChunk.getValue(i); - KU_ASSERT(nodeOffset < numNodes); + RYU_ASSERT(nodeOffset < numNodes); lengthData[nodeOffset]++; } } @@ -57,7 +57,7 @@ void CopyRelBatchInsert::populateCSRLengths(RelBatchInsertExecutionState& execut void CopyRelBatchInsert::setRowIdxFromCSROffsets(storage::ColumnChunkData& rowIdxChunk, storage::ColumnChunkData& csrOffsetChunk) { - KU_ASSERT(rowIdxChunk.getDataType().getPhysicalType() == common::PhysicalTypeID::INTERNAL_ID); + RYU_ASSERT(rowIdxChunk.getDataType().getPhysicalType() == common::PhysicalTypeID::INTERNAL_ID); for (auto i = 0u; i < rowIdxChunk.getNumValues(); i++) { const auto nodeOffset = rowIdxChunk.getValue(i); const auto csrOffset = csrOffsetChunk.getValue(nodeOffset); diff --git a/src/processor/operator/persistent/delete_executor.cpp b/src/processor/operator/persistent/delete_executor.cpp index dea7f2fefd..5b9f48136b 100644 --- a/src/processor/operator/persistent/delete_executor.cpp +++ b/src/processor/operator/persistent/delete_executor.cpp @@ -72,7 +72,7 @@ void SingleLabelNodeDeleteExecutor::init(ResultSet* resultSet, ExecutionContext* } void SingleLabelNodeDeleteExecutor::delete_(ExecutionContext* context) { - KU_ASSERT(tableInfo.pkVector->state == info.nodeIDVector->state); + RYU_ASSERT(tableInfo.pkVector->state == info.nodeIDVector->state); auto deleteState = std::make_unique(*info.nodeIDVector, *tableInfo.pkVector); auto transaction = Transaction::Get(*context->clientContext); @@ -87,7 +87,7 @@ void SingleLabelNodeDeleteExecutor::delete_(ExecutionContext* context) { tableInfo.detachDeleteFromRelTable(transaction, detachDeleteState.get()); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -100,7 +100,7 @@ void MultiLabelNodeDeleteExecutor::init(ResultSet* resultSet, ExecutionContext* void MultiLabelNodeDeleteExecutor::delete_(ExecutionContext* context) { auto& nodeIDSelVector = info.nodeIDVector->state->getSelVector(); - KU_ASSERT(nodeIDSelVector.getSelSize() == 1); + RYU_ASSERT(nodeIDSelVector.getSelSize() == 1); const auto pos = nodeIDSelVector[0]; if (info.nodeIDVector->isNull(pos)) { return; @@ -121,7 +121,7 @@ void MultiLabelNodeDeleteExecutor::delete_(ExecutionContext* context) { tableInfo.detachDeleteFromRelTable(transaction, detachDeleteState.get()); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -143,10 +143,10 @@ void SingleLabelRelDeleteExecutor::delete_(ExecutionContext* context) { void MultiLabelRelDeleteExecutor::delete_(ExecutionContext* context) { auto& idSelVector = info.relIDVector->state->getSelVector(); - KU_ASSERT(idSelVector.getSelSize() == 1); + RYU_ASSERT(idSelVector.getSelSize() == 1); const auto pos = idSelVector[0]; const auto relID = info.relIDVector->getValue(pos); - KU_ASSERT(tableIDToTableMap.contains(relID.tableID)); + RYU_ASSERT(tableIDToTableMap.contains(relID.tableID)); auto table = tableIDToTableMap.at(relID.tableID); auto deleteState = std::make_unique(*info.srcNodeIDVector, *info.dstNodeIDVector, *info.relIDVector); diff --git a/src/processor/operator/persistent/index_builder.cpp b/src/processor/operator/persistent/index_builder.cpp index 6070514dde..1199841a43 100644 --- a/src/processor/operator/persistent/index_builder.cpp +++ b/src/processor/operator/persistent/index_builder.cpp @@ -40,7 +40,7 @@ IndexBuilderGlobalQueues::IndexBuilderGlobalQueues(transaction::Transaction* tra : nodeTable(nodeTable), transaction{transaction} { TypeUtils::visit( pkTypeID(), [&](ku_string_t) { queues.emplace>(); }, - [&](T) { queues.emplace>(); }, [](auto) { KU_UNREACHABLE; }); + [&](T) { queues.emplace>(); }, [](auto) { RYU_UNREACHABLE; }); } PhysicalTypeID IndexBuilderGlobalQueues::pkTypeID() const { @@ -106,7 +106,7 @@ IndexBuilderLocalBuffers::IndexBuilderLocalBuffers(IndexBuilderGlobalQueues& glo globalQueues.pkTypeID(), [&](ku_string_t) { buffers = std::make_unique>(); }, [&](T) { buffers = std::make_unique>(); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } void IndexBuilderLocalBuffers::flush(NodeBatchInsertErrorHandler& errorHandler) { @@ -192,7 +192,7 @@ bool IndexBuilder::checkNonNullConstraint(const ColumnChunkData& chunk, chunk.getDataType().getPhysicalType(), [&](struct_entry_t) { // primary key cannot be struct - KU_UNREACHABLE; + RYU_UNREACHABLE; }, [&](T) { errorHandler.handleError({.message = ExceptionMessage::nullPKException(), diff --git a/src/processor/operator/persistent/insert_executor.cpp b/src/processor/operator/persistent/insert_executor.cpp index c9adf6c963..7ed2f13c89 100644 --- a/src/processor/operator/persistent/insert_executor.cpp +++ b/src/processor/operator/persistent/insert_executor.cpp @@ -20,7 +20,7 @@ void NodeInsertInfo::init(const ResultSet& resultSet) { } void NodeInsertInfo::updateNodeID(nodeID_t nodeID) const { - KU_ASSERT(nodeIDVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeIDVector->state->getSelVector().getSelSize() == 1); auto pos = nodeIDVector->state->getSelVector()[0]; nodeIDVector->setNull(pos, false); nodeIDVector->setValue(pos, nodeID); @@ -28,7 +28,7 @@ void NodeInsertInfo::updateNodeID(nodeID_t nodeID) const { nodeID_t NodeInsertInfo::getNodeID() const { auto& nodeIDSelVector = nodeIDVector->state->getSelVector(); - KU_ASSERT(nodeIDSelVector.getSelSize() == 1); + RYU_ASSERT(nodeIDSelVector.getSelSize() == 1); if (nodeIDVector->isNull(nodeIDSelVector[0])) { return {INVALID_OFFSET, INVALID_TABLE_ID}; } @@ -51,7 +51,7 @@ void NodeInsertExecutor::init(ResultSet* resultSet, const ExecutionContext* cont static void writeColumnVector(ValueVector* columnVector, const ValueVector* dataVector) { auto& columnSelVector = columnVector->state->getSelVector(); auto& dataSelVector = dataVector->state->getSelVector(); - KU_ASSERT(columnSelVector.getSelSize() == 1 && dataSelVector.getSelSize() == 1); + RYU_ASSERT(columnSelVector.getSelSize() == 1 && dataSelVector.getSelSize() == 1); auto columnPos = columnSelVector[0]; auto dataPos = dataSelVector[0]; if (dataVector->isNull(dataPos)) { @@ -65,7 +65,7 @@ static void writeColumnVector(ValueVector* columnVector, const ValueVector* data // TODO(Guodong/Xiyang): think we can reference data vector instead of copy. static void writeColumnVectors(const std::vector& columnVectors, const std::vector& dataVectors) { - KU_ASSERT(columnVectors.size() == dataVectors.size()); + RYU_ASSERT(columnVectors.size() == dataVectors.size()); for (auto i = 0u; i < columnVectors.size(); ++i) { if (columnVectors[i] == nullptr) { // No need to project continue; @@ -81,7 +81,7 @@ static void writeColumnVectorsToNull(const std::vector& columnVect continue; } auto& columnSelVector = columnVector->state->getSelVector(); - KU_ASSERT(columnSelVector.getSelSize() == 1); + RYU_ASSERT(columnSelVector.getSelSize() == 1); columnVector->setNull(columnSelVector[0], true); } } @@ -149,7 +149,7 @@ void RelTableInsertInfo::init(const ResultSet& resultSet, main::ClientContext* c internalID_t RelTableInsertInfo::getRelID() const { auto relIDVector = columnDataVectors[0]; auto& nodeIDSelVector = relIDVector->state->getSelVector(); - KU_ASSERT(nodeIDSelVector.getSelSize() == 1); + RYU_ASSERT(nodeIDSelVector.getSelSize() == 1); if (relIDVector->isNull(nodeIDSelVector[0])) { return {INVALID_OFFSET, INVALID_TABLE_ID}; } @@ -162,8 +162,8 @@ void RelInsertExecutor::init(ResultSet* resultSet, const ExecutionContext* conte } internalID_t RelInsertExecutor::insert(main::ClientContext* context) { - KU_ASSERT(info.srcNodeIDVector->state->getSelVector().getSelSize() == 1); - KU_ASSERT(info.dstNodeIDVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(info.srcNodeIDVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(info.dstNodeIDVector->state->getSelVector().getSelSize() == 1); auto srcNodeIDPos = info.srcNodeIDVector->state->getSelVector()[0]; auto dstNodeIDPos = info.dstNodeIDVector->state->getSelVector()[0]; if (info.srcNodeIDVector->isNull(srcNodeIDPos) || info.dstNodeIDVector->isNull(dstNodeIDPos)) { diff --git a/src/processor/operator/persistent/merge.cpp b/src/processor/operator/persistent/merge.cpp index 4e27c7f70b..b6439b91bb 100644 --- a/src/processor/operator/persistent/merge.cpp +++ b/src/processor/operator/persistent/merge.cpp @@ -57,7 +57,7 @@ void MergeLocalState::init(ResultSet& resultSet, main::ClientContext* context, M } bool MergeLocalState::patternExists() const { - KU_ASSERT(existenceVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(existenceVector->state->getSelVector().getSelSize() == 1); auto pos = existenceVector->state->getSelVector()[0]; return existenceVector->getValue(pos); } diff --git a/src/processor/operator/persistent/node_batch_insert.cpp b/src/processor/operator/persistent/node_batch_insert.cpp index 66ca63c6f6..45a823c0a6 100644 --- a/src/processor/operator/persistent/node_batch_insert.cpp +++ b/src/processor/operator/persistent/node_batch_insert.cpp @@ -77,7 +77,7 @@ void NodeBatchInsert::initLocalStateInternal(ResultSet* resultSet, ExecutionCont localState = std::make_unique( std::span{nodeInfo->columnTypes.begin(), nodeInfo->outputDataColumns.size()}); const auto nodeLocalState = localState->ptrCast(); - KU_ASSERT(nodeSharedState->globalIndexBuilder); + RYU_ASSERT(nodeSharedState->globalIndexBuilder); nodeLocalState->localIndexBuilder = nodeSharedState->globalIndexBuilder->clone(); nodeLocalState->errorHandler = createErrorHandler(context); nodeLocalState->optimisticAllocator = @@ -93,7 +93,7 @@ void NodeBatchInsert::initLocalStateInternal(ResultSet* resultSet, ExecutionCont nodeLocalState->chunkedGroup = std::make_unique(*MemoryManager::Get(*context->clientContext), nodeInfo->columnTypes, info->compressionEnabled, StorageConfig::NODE_GROUP_SIZE, 0); - KU_ASSERT(resultSet->dataChunks[0]); + RYU_ASSERT(resultSet->dataChunks[0]); nodeLocalState->columnState = resultSet->dataChunks[0]->state; } @@ -118,10 +118,10 @@ void NodeBatchInsert::executeInternal(ExecutionContext* context) { nodeLocalState->localIndexBuilder, MemoryManager::Get(*context->clientContext)); } if (nodeLocalState->localIndexBuilder) { - KU_ASSERT(token); + RYU_ASSERT(token); token->quit(); - KU_ASSERT(nodeLocalState->errorHandler.has_value()); + RYU_ASSERT(nodeLocalState->errorHandler.has_value()); nodeLocalState->localIndexBuilder->finishedProducing(nodeLocalState->errorHandler.value()); nodeLocalState->errorHandler->flushStoredErrors(); } @@ -190,7 +190,7 @@ void NodeBatchInsert::writeAndResetNodeGroup(transaction::Transaction* transacti std::unique_ptr& nodeGroup, std::optional& indexBuilder, MemoryManager* mm, PageAllocator& pageAllocator) const { const auto nodeLocalState = localState->ptrCast(); - KU_ASSERT(nodeLocalState->errorHandler.has_value()); + RYU_ASSERT(nodeLocalState->errorHandler.has_value()); writeAndResetNodeGroup(transaction, nodeGroup, indexBuilder, mm, nodeLocalState->errorHandler.value(), pageAllocator); } @@ -252,11 +252,11 @@ void NodeBatchInsert::appendIncompleteNodeGroup(transaction::Transaction* transa numNodesAppended /* offsetInNodeGroup */, localNodeGroup->getNumRows() - numNodesAppended); } - KU_ASSERT(numNodesAppended == localNodeGroup->getNumRows()); + RYU_ASSERT(numNodesAppended == localNodeGroup->getNumRows()); } void NodeBatchInsert::finalize(ExecutionContext* context) { - KU_ASSERT(localState == nullptr); + RYU_ASSERT(localState == nullptr); const auto nodeSharedState = ku_dynamic_cast(sharedState.get()); auto errorHandler = createErrorHandler(context); auto clientContext = context->clientContext; diff --git a/src/processor/operator/persistent/reader/copy_from_error.cpp b/src/processor/operator/persistent/reader/copy_from_error.cpp index 1c09cff27c..b31b0814d6 100644 --- a/src/processor/operator/persistent/reader/copy_from_error.cpp +++ b/src/processor/operator/persistent/reader/copy_from_error.cpp @@ -15,7 +15,7 @@ static PhysicalTypeID getPhysicalTypeFromDataSource(T* data) { } else if constexpr (std::is_same_v) { return data->dataType.getPhysicalType(); } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -28,18 +28,18 @@ WarningSourceData::DataType getValueFromData(T* data, common::idx_t pos) { case common::PhysicalTypeID::UINT32: return data->template getValue(pos); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } WarningSourceData::WarningSourceData(uint64_t numValues) : numValues(numValues) { - KU_ASSERT(numValues <= values.size()); + RYU_ASSERT(numValues <= values.size()); } template WarningSourceData WarningSourceData::constructFromData(const std::vector& data, common::idx_t pos) { - KU_ASSERT(data.size() >= CopyConstants::SHARED_WARNING_DATA_NUM_COLUMNS && + RYU_ASSERT(data.size() >= CopyConstants::SHARED_WARNING_DATA_NUM_COLUMNS && data.size() <= CopyConstants::MAX_NUM_WARNING_DATA_COLUMNS); WarningSourceData ret{data.size()}; for (idx_t i = 0; i < data.size(); ++i) { diff --git a/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp b/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp index 317c74b929..e2530d5043 100644 --- a/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp +++ b/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp @@ -32,7 +32,7 @@ struct CSVWarningSourceData { CSVWarningSourceData CSVWarningSourceData::constructFrom( const processor::WarningSourceData& warningData) { - KU_ASSERT(warningData.numValues == CopyConstants::CSV_WARNING_DATA_NUM_COLUMNS); + RYU_ASSERT(warningData.numValues == CopyConstants::CSV_WARNING_DATA_NUM_COLUMNS); CSVWarningSourceData ret{}; warningData.dumpTo(ret.blockIdx, ret.offsetInBlock, ret.startByteOffset, ret.endByteOffset, @@ -162,7 +162,7 @@ bool BaseCSVReader::readBuffer(uint64_t* start) { // the remaining part of the last buffer uint64_t remaining = 0; if (start != nullptr) { - KU_ASSERT(*start <= bufferSize); + RYU_ASSERT(*start <= bufferSize); remaining = bufferSize - *start; } @@ -174,7 +174,7 @@ bool BaseCSVReader::readBuffer(uint64_t* start) { buffer = std::unique_ptr(new char[bufferReadSize + remaining + 1]()); if (remaining > 0) { // remaining from last buffer: copy it here - KU_ASSERT(start != nullptr); + RYU_ASSERT(start != nullptr); memcpy(buffer.get(), oldBuffer.get() + *start, remaining); } auto readCount = fileInfo->readFile(buffer.get() + remaining, bufferReadSize); @@ -203,7 +203,7 @@ bool BaseCSVReader::readBuffer(uint64_t* start) { std::string BaseCSVReader::reconstructLine(uint64_t startPosition, uint64_t endPosition, bool completeLine) { - KU_ASSERT(endPosition >= startPosition); + RYU_ASSERT(endPosition >= startPosition); std::string res; // For cases where we cannot perform a seek (e.g. compressed file system) we just return an @@ -259,7 +259,7 @@ static std::optional getOptionalWarningData( std::is_same_v) { // For now we only populate extra warning data when IGNORE_ERRORS is enabled if (option.ignoreErrors) { - KU_ASSERT( + RYU_ASSERT( columnInfo.numWarningDataColumns == CopyConstants::CSV_WARNING_DATA_NUM_COLUMNS); warningData.emplace(warningSourceData, columnInfo.numColumns); } @@ -274,7 +274,7 @@ WarningSourceData BaseCSVReader::getWarningSourceData() const { template BaseCSVReader::parse_result_t BaseCSVReader::parseCSV(Driver& driver) { - KU_ASSERT(nullptr != errorHandler); + RYU_ASSERT(nullptr != errorHandler); // used for parsing algorithm curRowIdx = 0; @@ -331,7 +331,7 @@ BaseCSVReader::parse_result_t BaseCSVReader::parseCSV(Driver& driver) { goto final_state; add_value: // We get here after we have a delimiter. - KU_ASSERT(buffer[position] == option.delimiter || + RYU_ASSERT(buffer[position] == option.delimiter || buffer[position] == CopyConstants::DEFAULT_CSV_LIST_END_CHAR); // Trim one character if we have quotes. if (!addValue(driver, curRowIdx, column, @@ -353,7 +353,7 @@ BaseCSVReader::parse_result_t BaseCSVReader::parseCSV(Driver& driver) { goto value_start; add_row: { // We get here after we have a newline. - KU_ASSERT(isNewLine(buffer[position])); + RYU_ASSERT(isNewLine(buffer[position])); lineContext.setEndOfLine(getFileOffset()); bool isCarriageReturn = buffer[position] == '\r'; if (!addValue(driver, curRowIdx, column, @@ -418,7 +418,7 @@ BaseCSVReader::parse_result_t BaseCSVReader::parseCSV(Driver& driver) { // we are ignoring this error, skip current row and restart state machine goto ignore_error; unquote: - KU_ASSERT(hasQuotes && buffer[position] == option.quoteChar); + RYU_ASSERT(hasQuotes && buffer[position] == option.quoteChar); // this state handles the state directly after we unquote // in this state we expect either another quote (entering the quoted state again, and // escaping the quote) or a delimiter/newline, ending the current value and moving on to the @@ -532,7 +532,7 @@ BaseCSVReader::parse_result_t BaseCSVReader::parseCSV(Driver& driver) { } continue; } - KU_UNREACHABLE; + RYU_UNREACHABLE; } column_id_t BaseCSVReader::appendWarningDataColumns(std::vector& resultColumnNames, @@ -580,7 +580,7 @@ template BaseCSVReader::parse_result_t BaseCSVReader::parseCSV= bufferSize); + RYU_ASSERT(osFileOffset >= bufferSize); return osFileOffset - bufferSize + position; } diff --git a/src/processor/operator/persistent/reader/csv/driver.cpp b/src/processor/operator/persistent/reader/csv/driver.cpp index c1e2aba655..0a68760a67 100644 --- a/src/processor/operator/persistent/reader/csv/driver.cpp +++ b/src/processor/operator/persistent/reader/csv/driver.cpp @@ -72,11 +72,11 @@ bool ParsingDriver::addRow(uint64_t rowNum, common::column_id_t columnCount, if (warningDataWithColumnInfo.has_value()) { const auto warningDataStartColumn = warningDataWithColumnInfo->warningDataStartColumnIdx; const auto numWarningDataColumns = warningDataWithColumnInfo->data.numValues; - KU_ASSERT(numWarningDataColumns == CopyConstants::CSV_WARNING_DATA_NUM_COLUMNS); + RYU_ASSERT(numWarningDataColumns == CopyConstants::CSV_WARNING_DATA_NUM_COLUMNS); for (idx_t i = 0; i < numWarningDataColumns; ++i) { const auto& warningData = warningDataWithColumnInfo->data.values[i]; const auto columnIdx = warningDataStartColumn + i; - KU_ASSERT(columnIdx < chunk.getNumValueVectors()); + RYU_ASSERT(columnIdx < chunk.getNumValueVectors()); auto& vectorToSet = chunk.getValueVectorMutable(columnIdx); std::visit( [&vectorToSet, rowNum]( diff --git a/src/processor/operator/persistent/reader/csv/parallel_csv_reader.cpp b/src/processor/operator/persistent/reader/csv/parallel_csv_reader.cpp index 9cd7e84d95..76b0388520 100644 --- a/src/processor/operator/persistent/reader/csv/parallel_csv_reader.cpp +++ b/src/processor/operator/persistent/reader/csv/parallel_csv_reader.cpp @@ -56,7 +56,7 @@ void ParallelCSVReader::reportFinishedBlock() { } uint64_t ParallelCSVReader::continueBlock(DataChunk& resultChunk) { - KU_ASSERT(hasMoreToRead()); + RYU_ASSERT(hasMoreToRead()); ParallelParsingDriver driver(resultChunk, this); const auto [numRowsParsed, numErrors] = parseCSV(driver); increaseNumRowsInCurrentBlock(numRowsParsed, numErrors); diff --git a/src/processor/operator/persistent/reader/csv/serial_csv_reader.cpp b/src/processor/operator/persistent/reader/csv/serial_csv_reader.cpp index 6415803087..d1a88f1c18 100644 --- a/src/processor/operator/persistent/reader/csv/serial_csv_reader.cpp +++ b/src/processor/operator/persistent/reader/csv/serial_csv_reader.cpp @@ -61,7 +61,7 @@ std::vector> SerialCSVReader::sniffCSV( } uint64_t SerialCSVReader::parseBlock(block_idx_t blockIdx, DataChunk& resultChunk) { - KU_ASSERT(nullptr != errorHandler); + RYU_ASSERT(nullptr != errorHandler); if (blockIdx != currentBlockIdx) { resetNumRowsInCurrentBlock(); @@ -169,7 +169,7 @@ static void bindColumnsFromFile(const ExtraScanTableFuncBindInput* bindInput, ui void SerialCSVScan::bindColumns(const ExtraScanTableFuncBindInput* bindInput, std::vector& columnNames, std::vector& columnTypes, DialectOption& detectedDialect, bool& detectedHeader, main::ClientContext* context) { - KU_ASSERT(bindInput->fileScanInfo.getNumFiles() > 0); + RYU_ASSERT(bindInput->fileScanInfo.getNumFiles() > 0); bindColumnsFromFile(bindInput, 0, columnNames, columnTypes, detectedDialect, detectedHeader, context); for (auto i = 1u; i < bindInput->fileScanInfo.getNumFiles(); ++i) { diff --git a/src/processor/operator/persistent/reader/file_error_handler.cpp b/src/processor/operator/persistent/reader/file_error_handler.cpp index 378aafae5c..6ab3c15922 100644 --- a/src/processor/operator/persistent/reader/file_error_handler.cpp +++ b/src/processor/operator/persistent/reader/file_error_handler.cpp @@ -67,7 +67,7 @@ void SharedFileErrorHandler::tryThrowFirstCachedError() { std::sort(cachedErrors.begin(), cachedErrors.end()); const auto error = *cachedErrors.cbegin(); - KU_ASSERT(!error.mustThrow); + RYU_ASSERT(!error.mustThrow); const bool errorIsThrowable = canGetLineNumber(error.warningData.getBlockIdx()); if (errorIsThrowable) { @@ -103,7 +103,7 @@ std::string SharedFileErrorHandler::getErrorMessage(PopulatedCopyFromError popul } void SharedFileErrorHandler::throwError(CopyFromFileError error) const { - KU_ASSERT(populateErrorFunc); + RYU_ASSERT(populateErrorFunc); throw CopyException(getErrorMessage(populateErrorFunc(std::move(error), fileIdx))); } @@ -136,7 +136,7 @@ uint64_t SharedFileErrorHandler::getLineNumber(uint64_t blockIdx, // 1-indexed uint64_t res = numRowsReadInBlock + headerNumRows + 1; for (uint64_t i = 0; i < blockIdx; ++i) { - KU_ASSERT(i < linesPerBlock.size()); + RYU_ASSERT(i < linesPerBlock.size()); res += linesPerBlock[i].numLines; } return res; @@ -187,7 +187,7 @@ void LocalFileErrorHandler::handleError(CopyFromFileError error) { return; } - KU_ASSERT(cachedErrors.size() <= maxCachedErrorCount); + RYU_ASSERT(cachedErrors.size() <= maxCachedErrorCount); if (cachedErrors.size() == maxCachedErrorCount) { flushCachedErrors(); } diff --git a/src/processor/operator/persistent/reader/npy/npy_reader.cpp b/src/processor/operator/persistent/reader/npy/npy_reader.cpp index a176caaebf..938853eb74 100644 --- a/src/processor/operator/persistent/reader/npy/npy_reader.cpp +++ b/src/processor/operator/persistent/reader/npy/npy_reader.cpp @@ -285,7 +285,7 @@ static void bindColumns(const FileScanInfo& fileScanInfo, uint32_t fileIdx, static void bindColumns(const FileScanInfo& fileScanInfo, std::vector& columnNames, std::vector& columnTypes) { - KU_ASSERT(fileScanInfo.getNumFiles() > 0); + RYU_ASSERT(fileScanInfo.getNumFiles() > 0); bindColumns(fileScanInfo, 0, columnNames, columnTypes); for (auto i = 1u; i < fileScanInfo.getNumFiles(); ++i) { std::vector tmpColumnNames; @@ -313,7 +313,7 @@ static std::unique_ptr bindFunc(main::ClientContext* context, ReaderBindUtils::resolveColumns(scanInput->expectedColumnNames, detectedColumnNames, resultColumnNames, scanInput->expectedColumnTypes, detectedColumnTypes, resultColumnTypes); auto config = scanInput->fileScanInfo.copy(); - KU_ASSERT(!config.filePaths.empty() && config.getNumFiles() == resultColumnNames.size()); + RYU_ASSERT(!config.filePaths.empty() && config.getNumFiles() == resultColumnNames.size()); row_idx_t numRows = 0; for (auto i = 0u; i < config.getNumFiles(); i++) { auto reader = make_unique(config.filePaths[i]); diff --git a/src/processor/operator/persistent/reader/parquet/column_reader.cpp b/src/processor/operator/persistent/reader/parquet/column_reader.cpp index beddec83a7..84c5c0bbec 100644 --- a/src/processor/operator/persistent/reader/parquet/column_reader.cpp +++ b/src/processor/operator/persistent/reader/parquet/column_reader.cpp @@ -40,11 +40,11 @@ ColumnReader::ColumnReader(ParquetReader& reader, LogicalType type, void ColumnReader::initializeRead(uint64_t /*rowGroupIdx*/, const std::vector& columns, ryu_apache::thrift::protocol::TProtocol& protocol) { - KU_ASSERT(fileIdx < columns.size()); + RYU_ASSERT(fileIdx < columns.size()); chunk = &columns[fileIdx]; this->protocol = &protocol; - KU_ASSERT(chunk); - KU_ASSERT(chunk->__isset.meta_data); + RYU_ASSERT(chunk); + RYU_ASSERT(chunk->__isset.meta_data); if (chunk->__isset.file_path) { throw std::runtime_error("Only inlined data files are supported (no references)"); @@ -127,18 +127,18 @@ uint64_t ColumnReader::read(uint64_t numValues, parquet_filter_t& filter, uint8_ prepareRead(filter); } - KU_ASSERT(block); + RYU_ASSERT(block); auto readNow = std::min(toRead, pageRowsAvailable); - KU_ASSERT(readNow <= common::DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(readNow <= common::DEFAULT_VECTOR_CAPACITY); if (hasRepeats()) { - KU_ASSERT(repeatedDecoder); + RYU_ASSERT(repeatedDecoder); repeatedDecoder->GetBatch(repeatOut + resultOffset, readNow); } if (hasDefines()) { - KU_ASSERT(defineDecoder); + RYU_ASSERT(defineDecoder); defineDecoder->GetBatch(defineOut + resultOffset, readNow); } @@ -178,7 +178,7 @@ uint64_t ColumnReader::read(uint64_t numValues, parquet_filter_t& filter, uint8_ plain(readBuf, defineOut, readNow, filter, resultOffset, resultOut); } else if (rleDecoder) { // RLE encoding for boolean - KU_ASSERT(type.getLogicalTypeID() == common::LogicalTypeID::BOOL); + RYU_ASSERT(type.getLogicalTypeID() == common::LogicalTypeID::BOOL); auto readBuf = std::make_shared(); readBuf->resize(sizeof(bool) * (readNow - nullCount)); rleDecoder->GetBatch(readBuf->ptr, readNow - nullCount); @@ -265,7 +265,7 @@ std::unique_ptr ColumnReader::createReader(ParquetReader& reader, return std::make_unique(reader, std::move(type), schema, fileIdx, maxDefine, maxRepeat); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -383,7 +383,7 @@ void ColumnReader::decompressInternal(ryu_parquet::format::CompressionCodec::typ } void ColumnReader::preparePageV2(ryu_parquet::format::PageHeader& pageHdr) { - KU_ASSERT(pageHdr.type == PageType::DATA_PAGE_V2); + RYU_ASSERT(pageHdr.type == PageType::DATA_PAGE_V2); auto& trans = reinterpret_cast(*protocol->getTransport()); @@ -499,7 +499,7 @@ void ColumnReader::prepareDataPage(ryu_parquet::format::PageHeader& pageHdr) { } case Encoding::DELTA_LENGTH_BYTE_ARRAY: case Encoding::DELTA_BYTE_ARRAY: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } case Encoding::PLAIN: // nothing to do here, will be read directly below @@ -553,14 +553,14 @@ std::unique_ptr ColumnReader::createTimestampReader(ParquetReader& ParquetTimeStampUtils::parquetTimestampMsToTimestamp>>(reader, std::move(type), schema, fileIdx, maxDefine, maxRepeat); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } // LCOV_EXCL_STOP } - KU_UNREACHABLE; + RYU_UNREACHABLE; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/processor/operator/persistent/reader/parquet/list_column_reader.cpp b/src/processor/operator/persistent/reader/parquet/list_column_reader.cpp index bcebbff5db..5e90da8794 100644 --- a/src/processor/operator/persistent/reader/parquet/list_column_reader.cpp +++ b/src/processor/operator/persistent/reader/parquet/list_column_reader.cpp @@ -84,7 +84,7 @@ uint64_t ListColumnReader::read(uint64_t numValues, parquet_filter_t& /*filter*/ for (childIdx = 0; childIdx < childActualNumValues; childIdx++) { if (childRepeatsPtr[childIdx] == maxRepeat) { // value repeats on this level, append - KU_ASSERT(resultOffset > 0); + RYU_ASSERT(resultOffset > 0); resultPtr[resultOffset - 1].size++; continue; } diff --git a/src/processor/operator/persistent/reader/parquet/parquet_reader.cpp b/src/processor/operator/persistent/reader/parquet/parquet_reader.cpp index fd3202ad2b..f787cd7428 100644 --- a/src/processor/operator/persistent/reader/parquet/parquet_reader.cpp +++ b/src/processor/operator/persistent/reader/parquet/parquet_reader.cpp @@ -219,7 +219,7 @@ void ParquetReader::initMetadata() { std::unique_ptr ParquetReader::createReaderRecursive(uint64_t depth, uint64_t maxDefine, uint64_t maxRepeat, uint64_t& nextSchemaIdx, uint64_t& nextFileIdx) { - KU_ASSERT(nextSchemaIdx < metadata->schema.size()); + RYU_ASSERT(nextSchemaIdx < metadata->schema.size()); auto& sEle = metadata->schema[nextSchemaIdx]; auto thisIdx = nextSchemaIdx; @@ -246,7 +246,7 @@ std::unique_ptr ParquetReader::createReaderRecursive(uint64_t dept childrenReaders.push_back(std::move(childReader)); cIdx++; } - KU_ASSERT(!structFields.empty()); + RYU_ASSERT(!structFields.empty()); std::unique_ptr result; LogicalType resultType; @@ -345,8 +345,8 @@ std::unique_ptr ParquetReader::createReader() { columnTypes.push_back(field.getType().copy()); } - KU_ASSERT(nextSchemaIdx == metadata->schema.size() - 1); - KU_ASSERT( + RYU_ASSERT(nextSchemaIdx == metadata->schema.size() - 1); + RYU_ASSERT( metadata->row_groups.empty() || nextFileIdx == metadata->row_groups[0].columns.size()); return rootReader; } @@ -658,7 +658,7 @@ static void bindColumns(const ExtraScanTableFuncBindInput* bindInput, uint32_t f static void bindColumns(const ExtraScanTableFuncBindInput* bindInput, std::vector& columnNames, std::vector& columnTypes, main::ClientContext* context) { - KU_ASSERT(bindInput->fileScanInfo.getNumFiles() > 0); + RYU_ASSERT(bindInput->fileScanInfo.getNumFiles() > 0); bindColumns(bindInput, 0 /* fileIdx */, columnNames, columnTypes, context); for (auto i = 1u; i < bindInput->fileScanInfo.getNumFiles(); ++i) { std::vector tmpColumnNames; diff --git a/src/processor/operator/persistent/reader/parquet/string_column_reader.cpp b/src/processor/operator/persistent/reader/parquet/string_column_reader.cpp index 2b66f9c46a..7958c312bb 100644 --- a/src/processor/operator/persistent/reader/parquet/string_column_reader.cpp +++ b/src/processor/operator/persistent/reader/parquet/string_column_reader.cpp @@ -17,7 +17,7 @@ StringColumnReader::StringColumnReader(ParquetReader& reader, common::LogicalTyp std::move(type), schema, schemaIdx, maxDefine, maxRepeat) { fixedWidthStringLength = 0; if (schema.type == Type::FIXED_LEN_BYTE_ARRAY) { - KU_ASSERT(schema.__isset.type_length); + RYU_ASSERT(schema.__isset.type_length); fixedWidthStringLength = schema.type_length; } } diff --git a/src/processor/operator/persistent/reader/parquet/struct_column_reader.cpp b/src/processor/operator/persistent/reader/parquet/struct_column_reader.cpp index 610f51849d..121ff5b5ae 100644 --- a/src/processor/operator/persistent/reader/parquet/struct_column_reader.cpp +++ b/src/processor/operator/persistent/reader/parquet/struct_column_reader.cpp @@ -8,11 +8,11 @@ StructColumnReader::StructColumnReader(ParquetReader& reader, common::LogicalTyp uint64_t maxRepeat, std::vector> childReaders) : ColumnReader(reader, std::move(type), schema, schemaIdx, maxDefine, maxRepeat), childReaders(std::move(childReaders)) { - KU_ASSERT(this->type.getPhysicalType() == common::PhysicalTypeID::STRUCT); + RYU_ASSERT(this->type.getPhysicalType() == common::PhysicalTypeID::STRUCT); } ColumnReader* StructColumnReader::getChildReader(uint64_t childIdx) { - KU_ASSERT(childIdx < childReaders.size()); + RYU_ASSERT(childIdx < childReaders.size()); return childReaders[childIdx].get(); } @@ -41,7 +41,7 @@ void StructColumnReader::registerPrefetch(ThriftFileTransport& transport, bool a uint64_t StructColumnReader::read(uint64_t numValuesToRead, parquet_filter_t& filter, uint8_t* define_out, uint8_t* repeat_out, common::ValueVector* result) { auto& fieldVectors = common::StructVector::getFieldVectors(result); - KU_ASSERT(common::StructType::getNumFields(type) == fieldVectors.size()); + RYU_ASSERT(common::StructType::getNumFields(type) == fieldVectors.size()); if (pendingSkips > 0) { applyPendingSkips(pendingSkips); } diff --git a/src/processor/operator/persistent/reader/reader_bind_utils.cpp b/src/processor/operator/persistent/reader/reader_bind_utils.cpp index 9aaf36799c..ea619eb793 100644 --- a/src/processor/operator/persistent/reader/reader_bind_utils.cpp +++ b/src/processor/operator/persistent/reader/reader_bind_utils.cpp @@ -21,7 +21,7 @@ void ReaderBindUtils::validateNumColumns(uint32_t expectedNumber, uint32_t detec void ReaderBindUtils::validateColumnTypes(const std::vector& columnNames, const std::vector& expectedColumnTypes, const std::vector& detectedColumnTypes) { - KU_ASSERT(expectedColumnTypes.size() == detectedColumnTypes.size()); + RYU_ASSERT(expectedColumnTypes.size() == detectedColumnTypes.size()); for (auto i = 0u; i < expectedColumnTypes.size(); ++i) { if (expectedColumnTypes[i] != detectedColumnTypes[i]) { throw common::BinderException(common::stringFormat( diff --git a/src/processor/operator/persistent/rel_batch_insert.cpp b/src/processor/operator/persistent/rel_batch_insert.cpp index f521eedd14..fd638aed7c 100644 --- a/src/processor/operator/persistent/rel_batch_insert.cpp +++ b/src/processor/operator/persistent/rel_batch_insert.cpp @@ -170,7 +170,7 @@ void RelBatchInsert::appendNodeGroup(const RelGroupCatalogEntry& relGroupEntry, // Reset num of rows in the chunked group to fill gaps at the end of the node group. const auto maxSize = csrHeader.getEndCSROffset(numNodes - 1); auto numGapsAtEnd = maxSize - localState.chunkedGroup->getNumRows(); - KU_ASSERT(localState.chunkedGroup->getCapacity() >= maxSize); + RYU_ASSERT(localState.chunkedGroup->getCapacity() >= maxSize); while (numGapsAtEnd > 0) { const auto numGapsToFill = std::min(numGapsAtEnd, DEFAULT_VECTOR_CAPACITY); localState.dummyAllNullDataChunk->state->getSelVectorUnsafe().setSelSize(numGapsToFill); @@ -179,10 +179,10 @@ void RelBatchInsert::appendNodeGroup(const RelGroupCatalogEntry& relGroupEntry, dummyVectors.push_back(&localState.dummyAllNullDataChunk->getValueVectorMutable(i)); } const auto numGapsFilled = localState.chunkedGroup->append(dummyVectors, 0, numGapsToFill); - KU_ASSERT(numGapsFilled == numGapsToFill); + RYU_ASSERT(numGapsFilled == numGapsToFill); numGapsAtEnd -= numGapsFilled; } - KU_ASSERT(localState.chunkedGroup->getNumRows() == maxSize); + RYU_ASSERT(localState.chunkedGroup->getNumRows() == maxSize); auto* relTable = sharedState->table->ptrCast(); @@ -218,7 +218,7 @@ void RelBatchInsert::populateCSRHeader(const RelGroupCatalogEntry& relGroupEntry // Resize csr data column chunks. localState.chunkedGroup->resizeChunks(csrHeader.getEndCSROffset(numNodes - 1)); localState.chunkedGroup->resetToAllNull(); - KU_ASSERT(csrHeader.sanityCheck()); + RYU_ASSERT(csrHeader.sanityCheck()); } void RelBatchInsert::checkRelMultiplicityConstraint(const RelGroupCatalogEntry& relGroupEntry, @@ -239,7 +239,7 @@ void RelBatchInsert::checkRelMultiplicityConstraint(const RelGroupCatalogEntry& void RelBatchInsert::finalizeInternal(ExecutionContext* context) { const auto relInfo = info->ptrCast(); if (relInfo->direction == RelDataDirection::FWD) { - KU_ASSERT(relInfo->partitioningIdx == 0); + RYU_ASSERT(relInfo->partitioningIdx == 0); auto outputMsg = stringFormat("{} tuples have been copied to the {} table.", sharedState->getNumRows(), relInfo->tableName); diff --git a/src/processor/operator/persistent/set_executor.cpp b/src/processor/operator/persistent/set_executor.cpp index 9e8d5de037..5fd00144bc 100644 --- a/src/processor/operator/persistent/set_executor.cpp +++ b/src/processor/operator/persistent/set_executor.cpp @@ -29,11 +29,11 @@ static void writeColumnUpdateResult(ValueVector* idVector, ValueVector* columnVe auto& idSelVector = idVector->state->getSelVector(); auto& columnSelVector = columnVector->state->getSelVector(); auto& dataSelVector = dataVector->state->getSelVector(); - KU_ASSERT(idSelVector.getSelSize() == 1); + RYU_ASSERT(idSelVector.getSelSize() == 1); if (idVector->isNull(idSelVector[0])) { // No update happened. return; } - KU_ASSERT(dataSelVector.getSelSize() == 1); + RYU_ASSERT(dataSelVector.getSelSize() == 1); if (dataVector->isNull(dataSelVector[0])) { // Update to NULL columnVector->setNull(dataSelVector[0], true); return; @@ -63,7 +63,7 @@ void SingleLabelNodeSetExecutor::set(ExecutionContext* context) { void MultiLabelNodeSetExecutor::set(ExecutionContext* context) { info.evaluator->evaluate(); auto& nodeIDSelVector = info.nodeIDVector->state->getSelVector(); - KU_ASSERT(nodeIDSelVector.getSelSize() == 1); + RYU_ASSERT(nodeIDSelVector.getSelSize() == 1); auto nodeIDPos = nodeIDSelVector[0]; auto& nodeID = info.nodeIDVector->getValue(nodeIDPos); if (!tableInfos.contains(nodeID.tableID)) { @@ -120,7 +120,7 @@ void SingleLabelRelSetExecutor::set(ExecutionContext* context) { void MultiLabelRelSetExecutor::set(ExecutionContext* context) { info.evaluator->evaluate(); auto& idSelVector = info.relIDVector->state->getSelVector(); - KU_ASSERT(idSelVector.getSelSize() == 1); + RYU_ASSERT(idSelVector.getSelSize() == 1); auto relID = info.relIDVector->getValue(idSelVector[0]); if (!tableInfos.contains(relID.tableID)) { if (info.columnVectorPos.isValid()) { diff --git a/src/processor/operator/persistent/writer/parquet/basic_column_writer.cpp b/src/processor/operator/persistent/writer/parquet/basic_column_writer.cpp index 41c3d1c26a..4ada64807e 100644 --- a/src/processor/operator/persistent/writer/parquet/basic_column_writer.cpp +++ b/src/processor/operator/persistent/writer/parquet/basic_column_writer.cpp @@ -60,7 +60,7 @@ void BasicColumnWriter::beginWrite(ColumnWriterState& writerState) { for (auto pageIdx = 0u; pageIdx < state.pageInfo.size(); pageIdx++) { auto& pageInfo = state.pageInfo[pageIdx]; if (pageInfo.rowCount == 0) { - KU_ASSERT(pageIdx + 1 == state.pageInfo.size()); + RYU_ASSERT(pageIdx + 1 == state.pageInfo.size()); state.pageInfo.erase(state.pageInfo.begin() + pageIdx); break; } @@ -100,7 +100,7 @@ void BasicColumnWriter::write(ColumnWriterState& writerState, common::ValueVecto uint64_t offset = 0; while (remaining > 0) { auto& writeInfo = state.writeInfo[state.currentPage - 1]; - KU_ASSERT(writeInfo.bufferWriter != nullptr); + RYU_ASSERT(writeInfo.bufferWriter != nullptr); auto writeCount = std::min(remaining, writeInfo.maxWriteCount - writeInfo.writeCount); @@ -142,7 +142,7 @@ void BasicColumnWriter::finalizeWrite(ColumnWriterState& writerState) { // write the individual pages to disk uint64_t totalUncompressedSize = 0; for (auto& write_info : state.writeInfo) { - KU_ASSERT(write_info.pageHeader.uncompressed_page_size > 0); + RYU_ASSERT(write_info.pageHeader.uncompressed_page_size > 0); auto header_start_offset = writer.getOffset(); write_info.pageHeader.write(writer.getProtocol()); // total uncompressed size in the column chunk includes the header size (!) @@ -202,7 +202,7 @@ void BasicColumnWriter::nextPage(BasicColumnWriterState& state) { } void BasicColumnWriter::flushPage(BasicColumnWriterState& state) { - KU_ASSERT(state.currentPage > 0); + RYU_ASSERT(state.currentPage > 0); if (state.currentPage > state.writeInfo.size()) { return; } @@ -226,20 +226,20 @@ void BasicColumnWriter::flushPage(BasicColumnWriterState& state) { compressPage(bufferedWriter, writeInfo.compressedSize, writeInfo.compressedData, writeInfo.compressedBuf); hdr.compressed_page_size = writeInfo.compressedSize; - KU_ASSERT(hdr.uncompressed_page_size > 0); - KU_ASSERT(hdr.compressed_page_size > 0); + RYU_ASSERT(hdr.uncompressed_page_size > 0); + RYU_ASSERT(hdr.compressed_page_size > 0); if (writeInfo.compressedBuf) { // if the data has been compressed, we no longer need the compressed data - KU_ASSERT(writeInfo.compressedBuf.get() == writeInfo.compressedData); + RYU_ASSERT(writeInfo.compressedBuf.get() == writeInfo.compressedData); writeInfo.bufferWriter.reset(); } } void BasicColumnWriter::writeDictionary(BasicColumnWriterState& state, std::unique_ptr bufferedSerializer, uint64_t rowCount) { - KU_ASSERT(bufferedSerializer); - KU_ASSERT(bufferedSerializer->getSize() > 0); + RYU_ASSERT(bufferedSerializer); + RYU_ASSERT(bufferedSerializer->getSize() > 0); // write the dictionary page header PageWriteInformation writeInfo; diff --git a/src/processor/operator/persistent/writer/parquet/column_writer.cpp b/src/processor/operator/persistent/writer/parquet/column_writer.cpp index aeb39b14b4..79e4948e05 100644 --- a/src/processor/operator/persistent/writer/parquet/column_writer.cpp +++ b/src/processor/operator/persistent/writer/parquet/column_writer.cpp @@ -264,7 +264,7 @@ std::unique_ptr ColumnWriter::createWriterRecursive( std::move(schemaPathToCreate), maxRepeatToCreate, maxDefineToCreate, canHaveNullsToCreate); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -335,7 +335,7 @@ void ColumnWriter::compressPage(common::BufferWriter& bufferedSerializer, size_t bufferedSerializer.getSize(), reinterpret_cast(compressedBuf.get()), &compressedSize); compressedData = compressedBuf.get(); - KU_ASSERT(compressedSize <= ryu_snappy::MaxCompressedLength(bufferedSerializer.getSize())); + RYU_ASSERT(compressedSize <= ryu_snappy::MaxCompressedLength(bufferedSerializer.getSize())); } break; case CompressionCodec::ZSTD: { compressedSize = ryu_zstd::ZSTD_compressBound(bufferedSerializer.getSize()); @@ -364,7 +364,7 @@ void ColumnWriter::compressPage(common::BufferWriter& bufferedSerializer, size_t compressedData = compressedBuf.get(); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } if (compressedSize > uint64_t(function::NumericLimits::maximum())) { diff --git a/src/processor/operator/persistent/writer/parquet/parquet_rle_bp_encoder.cpp b/src/processor/operator/persistent/writer/parquet/parquet_rle_bp_encoder.cpp index 8a9dd05ecf..dcd1246e88 100644 --- a/src/processor/operator/persistent/writer/parquet/parquet_rle_bp_encoder.cpp +++ b/src/processor/operator/persistent/writer/parquet/parquet_rle_bp_encoder.cpp @@ -59,7 +59,7 @@ void RleBpEncoder::finishPrepare() { } uint64_t RleBpEncoder::getByteCount() const { - KU_ASSERT(byteCount != uint64_t(-1)); + RYU_ASSERT(byteCount != uint64_t(-1)); return byteCount; } @@ -73,7 +73,7 @@ void RleBpEncoder::writeRun(common::Serializer& writer) { // write the header of the run varintEncode(currentRunCount << 1, writer); // now write the value - KU_ASSERT(lastValue >> (byteWidth * 8) == 0); + RYU_ASSERT(lastValue >> (byteWidth * 8) == 0); switch (byteWidth) { case 1: writer.write(lastValue); @@ -90,7 +90,7 @@ void RleBpEncoder::writeRun(common::Serializer& writer) { writer.write(lastValue); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } currentRunCount = 1; } diff --git a/src/processor/operator/persistent/writer/parquet/parquet_writer.cpp b/src/processor/operator/persistent/writer/parquet/parquet_writer.cpp index 3205e565ad..25af760dfd 100644 --- a/src/processor/operator/persistent/writer/parquet/parquet_writer.cpp +++ b/src/processor/operator/persistent/writer/parquet/parquet_writer.cpp @@ -194,7 +194,7 @@ void ParquetWriter::prepareRowGroup(FactorizedTable& ft, PreparedRowGroup& resul auto& states = result.states; // iterate over each of the columns of the chunk collection and write them - KU_ASSERT(ft.getTableSchema()->getNumColumns() == columnWriters.size()); + RYU_ASSERT(ft.getTableSchema()->getNumColumns() == columnWriters.size()); std::vector> writerStates; std::unique_ptr unflatDataChunkToRead = std::make_unique(ft.getTableSchema()->getNumUnFlatColumns()); diff --git a/src/processor/operator/persistent/writer/parquet/string_column_writer.cpp b/src/processor/operator/persistent/writer/parquet/string_column_writer.cpp index 18d5368634..587bf85bcc 100644 --- a/src/processor/operator/persistent/writer/parquet/string_column_writer.cpp +++ b/src/processor/operator/persistent/writer/parquet/string_column_writer.cpp @@ -179,7 +179,7 @@ void StringColumnWriter::flushDictionary(BasicColumnWriterState& writerState, // First we need to sort the values in index order. auto values = std::vector(state.dictionary.size()); for (const auto& entry : state.dictionary) { - KU_ASSERT(values[entry.second].len == 0); + RYU_ASSERT(values[entry.second].len == 0); values[entry.second] = entry.first; } // First write the contents of the dictionary page to a temporary buffer. diff --git a/src/processor/operator/physical_operator.cpp b/src/processor/operator/physical_operator.cpp index 590b0c9400..80e2db5e57 100644 --- a/src/processor/operator/physical_operator.cpp +++ b/src/processor/operator/physical_operator.cpp @@ -161,7 +161,7 @@ PhysicalOperator::PhysicalOperator(PhysicalOperatorType operatorType, physical_o } std::unique_ptr PhysicalOperator::moveUnaryChild() { - KU_ASSERT(children.size() == 1); + RYU_ASSERT(children.size() == 1); auto result = std::move(children[0]); children.clear(); return result; diff --git a/src/processor/operator/scan/primary_key_scan_node_table.cpp b/src/processor/operator/scan/primary_key_scan_node_table.cpp index 84284e848c..79a314ee01 100644 --- a/src/processor/operator/scan/primary_key_scan_node_table.cpp +++ b/src/processor/operator/scan/primary_key_scan_node_table.cpp @@ -44,13 +44,13 @@ bool PrimaryKeyScanNodeTable::getNextTuplesInternal(ExecutionContext* context) { if (tableIdx >= tableInfos.size()) { return false; } - KU_ASSERT(tableIdx < tableInfos.size()); + RYU_ASSERT(tableIdx < tableInfos.size()); auto& tableInfo = tableInfos[tableIdx]; // Look up index indexEvaluator->evaluate(); auto indexVector = indexEvaluator->resultVector.get(); auto& selVector = indexVector->state->getSelVector(); - KU_ASSERT(selVector.getSelSize() == 1); + RYU_ASSERT(selVector.getSelSize() == 1); auto pos = selVector.getSelectedPositions()[0]; if (indexVector->isNull(pos)) { return false; diff --git a/src/processor/operator/scan/scan_node_table.cpp b/src/processor/operator/scan/scan_node_table.cpp index 35c4d709cb..c28b75f8b3 100644 --- a/src/processor/operator/scan/scan_node_table.cpp +++ b/src/processor/operator/scan/scan_node_table.cpp @@ -65,7 +65,7 @@ void ScanNodeTableSharedState::nextMorsel(NodeTableScanState& scanState, table_id_map_t ScanNodeTable::getSemiMasks() const { table_id_map_t result; - KU_ASSERT(tableInfos.size() == sharedStates.size()); + RYU_ASSERT(tableInfos.size() == sharedStates.size()); for (auto i = 0u; i < sharedStates.size(); ++i) { result.insert({tableInfos[i].table->getTableID(), sharedStates[i]->getSemiMask()}); } @@ -94,7 +94,7 @@ void ScanNodeTable::initCurrentTable(ExecutionContext* context) { } void ScanNodeTable::initGlobalStateInternal(ExecutionContext* context) { - KU_ASSERT(sharedStates.size() == tableInfos.size()); + RYU_ASSERT(sharedStates.size() == tableInfos.size()); for (auto i = 0u; i < tableInfos.size(); i++) { sharedStates[i]->initialize(transaction::Transaction::Get(*context->clientContext), tableInfos[i].table->ptrCast(), *progressSharedState); diff --git a/src/processor/operator/scan/scan_rel_table.cpp b/src/processor/operator/scan/scan_rel_table.cpp index d9ceea5146..24ad9f46d4 100644 --- a/src/processor/operator/scan/scan_rel_table.cpp +++ b/src/processor/operator/scan/scan_rel_table.cpp @@ -42,7 +42,7 @@ std::string ScanRelTablePrintInfo::toString() const { result += "]->"; } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } result += "("; result += nbrNode->toString(); diff --git a/src/processor/operator/semi_masker.cpp b/src/processor/operator/semi_masker.cpp index 6ebc4a68c6..42d72ffd89 100644 --- a/src/processor/operator/semi_masker.cpp +++ b/src/processor/operator/semi_masker.cpp @@ -122,8 +122,8 @@ bool NodeIDsSingleTableSemiMasker::getNextTuplesInternal(ExecutionContext* conte return false; } auto& selVector = keyVector->state->getSelVector(); - KU_ASSERT(keyVector->state == srcNodeIDVector->state); - KU_ASSERT(keyVector->state == dstNodeIDVector->state); + RYU_ASSERT(keyVector->state == srcNodeIDVector->state); + RYU_ASSERT(keyVector->state == dstNodeIDVector->state); auto keyDataVector = ListVector::getDataVector(keyVector); for (auto i = 0u; i < selVector.getSelSize(); ++i) { auto pos = selVector[i]; @@ -142,8 +142,8 @@ bool NodeIDsMultipleTableSemiMasker::getNextTuplesInternal(ExecutionContext* con return false; } auto& selVector = keyVector->state->getSelVector(); - KU_ASSERT(keyVector->state == srcNodeIDVector->state); - KU_ASSERT(keyVector->state == dstNodeIDVector->state); + RYU_ASSERT(keyVector->state == srcNodeIDVector->state); + RYU_ASSERT(keyVector->state == dstNodeIDVector->state); auto keyDataVector = ListVector::getDataVector(keyVector); for (auto i = 0u; i < selVector.getSelSize(); ++i) { auto pos = selVector[i]; diff --git a/src/processor/operator/simple/install_extension.cpp b/src/processor/operator/simple/install_extension.cpp index ee1fed551f..60beec89bf 100644 --- a/src/processor/operator/simple/install_extension.cpp +++ b/src/processor/operator/simple/install_extension.cpp @@ -36,7 +36,7 @@ void InstallExtension::executeInternal(ExecutionContext* context) { bool installResult = installer.install(); setOutputMessage(installResult, storage::MemoryManager::Get(*clientContext)); if (info.forceInstall) { - KU_ASSERT(installResult); + RYU_ASSERT(installResult); } } diff --git a/src/processor/operator/skip.cpp b/src/processor/operator/skip.cpp index 57451eefbe..a527f884df 100644 --- a/src/processor/operator/skip.cpp +++ b/src/processor/operator/skip.cpp @@ -35,7 +35,7 @@ bool Skip::getNextTuplesInternal(ExecutionContext* context) { } else { // If all dataChunks are flat, numTupleAvailable = 1 which means numTupleSkippedBefore = // skipNumber. So execution is handled in above if statement. - KU_ASSERT(!dataChunkToSelect->state->isFlat()); + RYU_ASSERT(!dataChunkToSelect->state->isFlat()); auto buffer = dataChunkToSelect->state->getSelVectorUnsafe().getMutableBuffer(); if (dataChunkToSelect->state->getSelVector().isUnfiltered()) { for (uint64_t i = numTupleToSkipInCurrentResultSet; diff --git a/src/processor/operator/transaction.cpp b/src/processor/operator/transaction.cpp index 6d36ba6751..e4f1205366 100644 --- a/src/processor/operator/transaction.cpp +++ b/src/processor/operator/transaction.cpp @@ -42,7 +42,7 @@ bool Transaction::getNextTuplesInternal(ExecutionContext* context) { TransactionManager::Get(*clientContext)->checkpoint(*clientContext); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return true; @@ -73,7 +73,7 @@ void Transaction::validateActiveTransaction(const TransactionContext& context) c } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/processor/operator/unwind.cpp b/src/processor/operator/unwind.cpp index 3ecc0d094a..c370dc87a0 100644 --- a/src/processor/operator/unwind.cpp +++ b/src/processor/operator/unwind.cpp @@ -36,7 +36,7 @@ void Unwind::copyTuplesToOutVector(uint64_t startPos, uint64_t endPos) const { outValueVector->copyFromVectorData(i, listDataVector, listPos++); } if (idVector != nullptr) { - KU_ASSERT(listDataVector->dataType.getLogicalTypeID() == common::LogicalTypeID::NODE); + RYU_ASSERT(listDataVector->dataType.getLogicalTypeID() == common::LogicalTypeID::NODE); auto idFieldVector = StructVector::getFieldVector(listDataVector, 0); listPos = listEntry.offset + startPos; for (auto i = 0u; i < endPos - startPos; i++) { diff --git a/src/processor/result/base_hash_table.cpp b/src/processor/result/base_hash_table.cpp index 59ae2aa838..72534153b9 100644 --- a/src/processor/result/base_hash_table.cpp +++ b/src/processor/result/base_hash_table.cpp @@ -179,7 +179,7 @@ template<> static bool compareNodeEntry(const common::ValueVector* vector, uint32_t vectorPos, const uint8_t* entry) { - KU_ASSERT(0 == common::StructType::getFieldIdx(vector->dataType, common::InternalKeyword::ID)); + RYU_ASSERT(0 == common::StructType::getFieldIdx(vector->dataType, common::InternalKeyword::ID)); auto idVector = common::StructVector::getFieldVector(vector, 0).get(); return compareEntry(idVector, vectorPos, getFTStructNodeID(entry, vector->dataType)); @@ -187,7 +187,7 @@ static bool compareNodeEntry(const common::ValueVector* vector, uint32_t vectorP static bool compareRelEntry(const common::ValueVector* vector, uint32_t vectorPos, const uint8_t* entry) { - KU_ASSERT(3 == common::StructType::getFieldIdx(vector->dataType, common::InternalKeyword::ID)); + RYU_ASSERT(3 == common::StructType::getFieldIdx(vector->dataType, common::InternalKeyword::ID)); auto idVector = common::StructVector::getFieldVector(vector, 3).get(); return compareEntry(idVector, vectorPos, getFTStructRelID(entry, vector->dataType)); @@ -227,7 +227,7 @@ static compare_function_t getCompareEntryFunc(const LogicalType& type) { default: { TypeUtils::visit( type.getPhysicalType(), [&](T) { func = compareEntry; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } } return func; @@ -246,7 +246,7 @@ static ft_compare_function_t getFactorizedTableCompareEntryFunc(const LogicalTyp TypeUtils::visit( type.getPhysicalType(), [&](T) { func = factorizedTableCompareEntry; }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } } return func; @@ -264,8 +264,8 @@ bool BaseHashTable::matchFlatVecWithEntry(const std::vectorstate->isFlat()); - KU_ASSERT(keyVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(keyVector->state->isFlat()); + RYU_ASSERT(keyVector->state->getSelVector().getSelSize() == 1); auto pos = keyVector->state->getSelVector()[0]; auto isKeyVectorNull = keyVector->isNull(pos); auto isEntryKeyNull = diff --git a/src/processor/result/factorized_table.cpp b/src/processor/result/factorized_table.cpp index 8b83c134cf..5a41d3a809 100644 --- a/src/processor/result/factorized_table.cpp +++ b/src/processor/result/factorized_table.cpp @@ -121,7 +121,7 @@ void FactorizedTable::append(const std::vector& vectors) { copyVectorToColumn(*vectors[i], blockAppendInfo, numAppendedTuples, i); numAppendedTuples += blockAppendInfo.numTuplesToAppend; } - KU_ASSERT(numAppendedTuples == numTuplesToAppend); + RYU_ASSERT(numAppendedTuples == numTuplesToAppend); } numTuples += numTuplesToAppend; } @@ -140,13 +140,13 @@ void FactorizedTable::resize(uint64_t numTuples) { block->numTuples += numTuplesToAddInBlock; numTuplesToAdd -= numTuplesToAddInBlock; } - KU_ASSERT(numTuplesToAdd < numFlatTuplesPerBlock); + RYU_ASSERT(numTuplesToAdd < numFlatTuplesPerBlock); auto block = flatTupleBlockCollection->getLastBlock(); block->freeSize -= numBytesPerTuple * numTuplesToAdd; block->numTuples += numTuplesToAdd; } else { auto numTuplesRemaining = numTuples; - KU_ASSERT(flatTupleBlockCollection->getBlocks().size() == 1); + RYU_ASSERT(flatTupleBlockCollection->getBlocks().size() == 1); // TODO: It always adds to the end, so this will leave empty blocks in the middle if it's // reused for (auto& block : flatTupleBlockCollection->getBlocks()) { @@ -156,7 +156,7 @@ void FactorizedTable::resize(uint64_t numTuples) { block->getSizedData().size() - block->numTuples * tableSchema.getNumBytesPerTuple(); numTuplesRemaining -= block->numTuples; } - KU_ASSERT(numTuplesRemaining == 0); + RYU_ASSERT(numTuplesRemaining == 0); } this->numTuples = numTuples; } @@ -176,8 +176,8 @@ uint8_t* FactorizedTable::appendEmptyTuple() { void FactorizedTable::scan(std::span vectors, ft_tuple_idx_t tupleIdx, uint64_t numTuplesToScan, std::span colIdxesToScan) const { - KU_ASSERT(tupleIdx + numTuplesToScan <= numTuples); - KU_ASSERT(vectors.size() == colIdxesToScan.size()); + RYU_ASSERT(tupleIdx + numTuplesToScan <= numTuples); + RYU_ASSERT(vectors.size() == colIdxesToScan.size()); std::unique_ptr tuplesToRead = std::make_unique(numTuplesToScan); for (auto i = 0u; i < numTuplesToScan; i++) { tuplesToRead[i] = getTuple(tupleIdx + i); @@ -188,19 +188,19 @@ void FactorizedTable::scan(std::span vectors, ft_tuple_idx_t tuple void FactorizedTable::lookup(std::span vectors, std::span colIdxesToScan, uint8_t** tuplesToRead, uint64_t startPos, uint64_t numTuplesToRead) const { - KU_ASSERT(vectors.size() == colIdxesToScan.size()); + RYU_ASSERT(vectors.size() == colIdxesToScan.size()); for (auto i = 0u; i < colIdxesToScan.size(); i++) { auto vector = vectors[i]; // TODO(Xiyang/Ziyi): we should set up a rule about when to reset. Should it be in operator? vector->resetAuxiliaryBuffer(); ft_col_idx_t colIdx = colIdxesToScan[i]; if (tableSchema.getColumn(colIdx)->isFlat()) { - KU_ASSERT(!(vector->state->isFlat() && numTuplesToRead > 1)); + RYU_ASSERT(!(vector->state->isFlat() && numTuplesToRead > 1)); readFlatCol(tuplesToRead + startPos, colIdx, *vector, numTuplesToRead); } else { // If the caller wants to read an unflat column from factorizedTable, the vector // must be unflat and the numTuplesToScan should be 1. - KU_ASSERT(!vector->state->isFlat() && numTuplesToRead == 1); + RYU_ASSERT(!vector->state->isFlat() && numTuplesToRead == 1); readUnflatCol(tuplesToRead + startPos, colIdx, *vector); } } @@ -208,7 +208,7 @@ void FactorizedTable::lookup(std::span vectors, void FactorizedTable::lookup(std::vector& vectors, const SelectionVector* selVector, std::vector& colIdxesToScan, uint8_t* tupleToRead) const { - KU_ASSERT(vectors.size() == colIdxesToScan.size()); + RYU_ASSERT(vectors.size() == colIdxesToScan.size()); for (auto i = 0u; i < colIdxesToScan.size(); i++) { ft_col_idx_t colIdx = colIdxesToScan[i]; if (tableSchema.getColumn(colIdx)->isFlat()) { @@ -222,9 +222,9 @@ void FactorizedTable::lookup(std::vector& vectors, const Selection void FactorizedTable::lookup(std::vector& vectors, std::vector& colIdxesToScan, std::vector& tupleIdxesToRead, uint64_t startPos, uint64_t numTuplesToRead) const { - KU_ASSERT(vectors.size() == colIdxesToScan.size()); + RYU_ASSERT(vectors.size() == colIdxesToScan.size()); auto tuplesToRead = std::make_unique(tupleIdxesToRead.size()); - KU_ASSERT(numTuplesToRead > 0); + RYU_ASSERT(numTuplesToRead > 0); for (auto i = 0u; i < numTuplesToRead; i++) { tuplesToRead[i] = getTuple(tupleIdxesToRead[i + startPos]); } @@ -240,7 +240,7 @@ void FactorizedTable::mergeMayContainNulls(FactorizedTable& other) { } void FactorizedTable::merge(FactorizedTable& other) { - KU_ASSERT(tableSchema == other.tableSchema); + RYU_ASSERT(tableSchema == other.tableSchema); if (other.numTuples == 0) { return; } @@ -282,11 +282,11 @@ uint64_t FactorizedTable::getNumFlatTuples(ft_tuple_idx_t tupleIdx) const { } uint8_t* FactorizedTable::getTuple(ft_tuple_idx_t tupleIdx) const { - KU_ASSERT(tupleIdx < numTuples); + RYU_ASSERT(tupleIdx < numTuples); auto [blockIdx, tupleIdxInBlock] = getBlockIdxAndTupleIdxInBlock(tupleIdx); auto buffer = flatTupleBlockCollection->getBlock(blockIdx)->getSizedData(); // Check that the end of the block doesn't overflow the buffer - KU_ASSERT((tupleIdxInBlock + 1) * tableSchema.getNumBytesPerTuple() <= buffer.size()); + RYU_ASSERT((tupleIdxInBlock + 1) * tableSchema.getNumBytesPerTuple() <= buffer.size()); return buffer.data() + tupleIdxInBlock * tableSchema.getNumBytesPerTuple(); } @@ -304,7 +304,7 @@ void FactorizedTable::updateFlatCell(uint8_t* tuplePtr, ft_col_idx_t colIdx, bool FactorizedTable::isOverflowColNull(const uint8_t* nullBuffer, ft_tuple_idx_t tupleIdx, ft_col_idx_t colIdx) const { - KU_ASSERT(colIdx < tableSchema.getNumColumns()); + RYU_ASSERT(colIdx < tableSchema.getNumColumns()); if (tableSchema.getColumn(colIdx)->hasNoNullGuarantee()) { return false; } @@ -312,7 +312,7 @@ bool FactorizedTable::isOverflowColNull(const uint8_t* nullBuffer, ft_tuple_idx_ } bool FactorizedTable::isNonOverflowColNull(const uint8_t* nullBuffer, ft_col_idx_t colIdx) const { - KU_ASSERT(colIdx < tableSchema.getNumColumns()); + RYU_ASSERT(colIdx < tableSchema.getNumColumns()); if (tableSchema.getColumn(colIdx)->hasNoNullGuarantee()) { return false; } @@ -320,7 +320,7 @@ bool FactorizedTable::isNonOverflowColNull(const uint8_t* nullBuffer, ft_col_idx } bool FactorizedTable::isNonOverflowColNull(ft_tuple_idx_t tupleIdx, ft_col_idx_t colIdx) const { - KU_ASSERT(colIdx < tableSchema.getNumColumns()); + RYU_ASSERT(colIdx < tableSchema.getNumColumns()); if (tableSchema.getColumn(colIdx)->hasNoNullGuarantee()) { return false; } @@ -349,7 +349,7 @@ void FactorizedTable::setOverflowColNull(uint8_t* nullBuffer, ft_col_idx_t colId // TODO(Guodong): change this function to not use dataChunkPos in ColumnSchema. uint64_t FactorizedTable::computeNumTuplesToAppend( const std::vector& vectorsToAppend) const { - KU_ASSERT(!vectorsToAppend.empty()); + RYU_ASSERT(!vectorsToAppend.empty()); auto numTuplesToAppend = 1ul; for (auto i = 0u; i < vectorsToAppend.size(); i++) { // If the caller tries to append an unflat vector to a flat column in the @@ -473,7 +473,7 @@ void FactorizedTable::copyUnflatVectorToFlatColumn(const ValueVector& vector, // factorizedTable. NullMasks are stored inside the overflow buffer. void FactorizedTable::copyVectorToUnflatColumn(const ValueVector& vector, const BlockAppendingInfo& blockAppendInfo, ft_col_idx_t colIdx) { - KU_ASSERT(!vector.state->isFlat()); + RYU_ASSERT(!vector.state->isFlat()); auto unflatTupleValue = appendVectorToUnflatTupleBlocks(vector, colIdx); auto blockPtr = blockAppendInfo.data + tableSchema.getColOffset(colIdx); for (auto i = 0u; i < blockAppendInfo.numTuplesToAppend; i++) { @@ -493,7 +493,7 @@ void FactorizedTable::copyVectorToColumn(const ValueVector& vector, overflow_value_t FactorizedTable::appendVectorToUnflatTupleBlocks(const ValueVector& vector, ft_col_idx_t colIdx) { - KU_ASSERT(!vector.state->isFlat()); + RYU_ASSERT(!vector.state->isFlat()); auto numFlatTuplesInVector = vector.state->getSelVector().getSelSize(); auto numBytesPerValue = LogicalTypeUtils::getRowLayoutSize(vector.dataType); auto numBytesForData = numBytesPerValue * numFlatTuplesInVector; @@ -545,7 +545,7 @@ void FactorizedTable::readUnflatCol(uint8_t** tuplesToRead, ft_col_idx_t colIdx, ValueVector& vector) const { auto overflowColValue = *(overflow_value_t*)(tuplesToRead[0] + tableSchema.getColOffset(colIdx)); - KU_ASSERT(vector.state->getSelVector().isUnfiltered()); + RYU_ASSERT(vector.state->getSelVector().isUnfiltered()); auto numBytesPerValue = LogicalTypeUtils::getRowLayoutSize(vector.dataType); if (hasNoNullGuarantee(colIdx)) { vector.setAllNonNull(); @@ -574,7 +574,7 @@ void FactorizedTable::readUnflatCol(uint8_t** tuplesToRead, ft_col_idx_t colIdx, void FactorizedTable::readUnflatCol(const uint8_t* tupleToRead, const SelectionVector& selVector, ft_col_idx_t colIdx, ValueVector& vector) const { auto vectorOverflowValue = *(overflow_value_t*)(tupleToRead + tableSchema.getColOffset(colIdx)); - KU_ASSERT(vector.state->getSelVector().isUnfiltered()); + RYU_ASSERT(vector.state->getSelVector().isUnfiltered()); if (hasNoNullGuarantee(colIdx)) { vector.setAllNonNull(); auto val = vectorOverflowValue.value; diff --git a/src/processor/result/pattern_creation_info_table.cpp b/src/processor/result/pattern_creation_info_table.cpp index 1c942aecf2..22af6012e3 100644 --- a/src/processor/result/pattern_creation_info_table.cpp +++ b/src/processor/result/pattern_creation_info_table.cpp @@ -29,7 +29,7 @@ PatternCreationInfo PatternCreationInfoTable::getPatternCreationInfo( tuple = factorizedTable->appendEmptyTuple(); hasCreated = false; } - KU_ASSERT(factorizedTable->getNumTuples() == 1); + RYU_ASSERT(factorizedTable->getNumTuples() == 1); return PatternCreationInfo{tuple, hasCreated}; } else { resizeHashTableIfNecessary(1); @@ -46,7 +46,7 @@ PatternCreationInfo PatternCreationInfoTable::getPatternCreationInfo( uint64_t PatternCreationInfoTable::matchFTEntries(std::span keyVectors, uint64_t numMayMatches, uint64_t numNoMatches) { numNoMatches = AggregateHashTable::matchFTEntries(keyVectors, numMayMatches, numNoMatches); - KU_ASSERT(numMayMatches <= 1); + RYU_ASSERT(numMayMatches <= 1); // If we found the entry for the target key, we set tuple to the key tuple. Otherwise, simply // set tuple to nullptr. tuple = numMayMatches != 0 ? hashSlotsToUpdateAggState[mayMatchIdxes[0]]->getEntry() : nullptr; diff --git a/src/processor/result/result_set.cpp b/src/processor/result/result_set.cpp index c3ec9ccc91..5a09cc3adb 100644 --- a/src/processor/result/result_set.cpp +++ b/src/processor/result/result_set.cpp @@ -28,7 +28,7 @@ ResultSet::ResultSet(ResultSetDescriptor* resultSetDescriptor, uint64_t ResultSet::getNumTuplesWithoutMultiplicity( const std::unordered_set& dataChunksPosInScope) { - KU_ASSERT(!dataChunksPosInScope.empty()); + RYU_ASSERT(!dataChunksPosInScope.empty()); uint64_t numTuples = 1; for (auto& dataChunkPos : dataChunksPosInScope) { numTuples *= dataChunks[dataChunkPos]->state->getSelVector().getSelSize(); diff --git a/src/processor/warning_context.cpp b/src/processor/warning_context.cpp index 99cac3e9c6..7e350da5b5 100644 --- a/src/processor/warning_context.cpp +++ b/src/processor/warning_context.cpp @@ -43,7 +43,7 @@ void WarningContext::appendWarningMessages(const std::vector& const std::vector& WarningContext::getPopulatedWarnings() const { // if there are still unpopulated warnings when we try to get populated warnings something is // probably wrong - KU_ASSERT(unpopulatedWarnings.empty()); + RYU_ASSERT(unpopulatedWarnings.empty()); return populatedWarnings; } diff --git a/src/storage/buffer_manager/buffer_manager.cpp b/src/storage/buffer_manager/buffer_manager.cpp index e4640548d8..19a9d52f92 100644 --- a/src/storage/buffer_manager/buffer_manager.cpp +++ b/src/storage/buffer_manager/buffer_manager.cpp @@ -60,7 +60,7 @@ void EvictionQueue::clear(std::atomic& candidate) { size--; return; } - KU_UNREACHABLE; + RYU_UNREACHABLE; } BufferManager::BufferManager(const std::string& databasePath, const std::string& spillToDiskPath, @@ -128,7 +128,7 @@ uint8_t* BufferManager::pin(FileHandle& fileHandle, page_idx_t pageIdx, "Eviction queue is full! This should be impossible."); } #if BM_MALLOC - KU_ASSERT(pageState->getPage()); + RYU_ASSERT(pageState->getPage()); return pageState->getPage(); #else return getFrame(fileHandle, pageIdx); @@ -145,7 +145,7 @@ uint8_t* BufferManager::pin(FileHandle& fileHandle, page_idx_t pageIdx, continue; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -276,7 +276,7 @@ uint64_t BufferManager::evictPages() { if (evictionCandidate == EvictionQueue::EMPTY) { continue; } - KU_ASSERT(evictionCandidate.fileIdx < fileHandles.size()); + RYU_ASSERT(evictionCandidate.fileIdx < fileHandles.size()); auto* pageState = fileHandles[evictionCandidate.fileIdx]->getPageState(evictionCandidate.pageIdx); auto pageStateAndVersion = pageState->getStateAndVersion(); @@ -304,7 +304,7 @@ void BufferManager::removeEvictedCandidates() { if (evictionCandidate == EvictionQueue::EMPTY) { continue; } - KU_ASSERT(evictionCandidate.fileIdx < fileHandles.size()); + RYU_ASSERT(evictionCandidate.fileIdx < fileHandles.size()); auto* pageState = fileHandles[evictionCandidate.fileIdx]->getPageState(evictionCandidate.pageIdx); auto pageStateAndVersion = pageState->getStateAndVersion(); @@ -465,7 +465,7 @@ void BufferManager::removeFilePagesFromFrames(FileHandle& fileHandle) { void BufferManager::updateFrameIfPageIsInFrameWithoutLock(file_idx_t fileIdx, const uint8_t* newPage, page_idx_t pageIdx) { - KU_ASSERT(fileIdx < fileHandles.size()); + RYU_ASSERT(fileIdx < fileHandles.size()); auto& fileHandle = *fileHandles[fileIdx]; auto state = fileHandle.getPageState(pageIdx); if (state && state->getState() != PageState::EVICTED) { @@ -497,7 +497,7 @@ void BufferManager::removePageFromFrame(FileHandle& fileHandle, page_idx_t pageI } uint64_t BufferManager::freeUsedMemory(uint64_t size) { - KU_ASSERT(usedMemory.load() >= size); + RYU_ASSERT(usedMemory.load() >= size); return usedMemory.fetch_sub(size); } diff --git a/src/storage/buffer_manager/memory_manager.cpp b/src/storage/buffer_manager/memory_manager.cpp index d206bffd4a..129e887b55 100644 --- a/src/storage/buffer_manager/memory_manager.cpp +++ b/src/storage/buffer_manager/memory_manager.cpp @@ -41,7 +41,7 @@ SpillResult MemoryBuffer::setSpilledToDisk(uint64_t filePosition) { } void MemoryBuffer::prepareLoadFromDisk() { - KU_ASSERT(buffer.data() == nullptr && evicted); + RYU_ASSERT(buffer.data() == nullptr && evicted); buffer = mm->mallocBuffer(false, buffer.size()); evicted = false; } diff --git a/src/storage/buffer_manager/spiller.cpp b/src/storage/buffer_manager/spiller.cpp index c6c8825911..ff607c8671 100644 --- a/src/storage/buffer_manager/spiller.cpp +++ b/src/storage/buffer_manager/spiller.cpp @@ -67,7 +67,7 @@ Spiller::~Spiller() { SpillResult Spiller::spillToDisk(ColumnChunkData& chunk) const { auto& buffer = *chunk.buffer; - KU_ASSERT(!buffer.evicted); + RYU_ASSERT(!buffer.evicted); auto dataFH = getOrCreateDataFH(); auto pageSize = dataFH->getPageSize(); auto numPages = (buffer.buffer.size_bytes() + pageSize - 1) / pageSize; @@ -81,7 +81,7 @@ void Spiller::loadFromDisk(ColumnChunkData& chunk) const { if (buffer.evicted) { buffer.prepareLoadFromDisk(); auto dataFH = getDataFH(); - KU_ASSERT(dataFH); + RYU_ASSERT(dataFH); dataFH->getFileInfo()->readFromFile(buffer.buffer.data(), buffer.buffer.size(), buffer.filePosition); } diff --git a/src/storage/compression/bitpacking_int128.cpp b/src/storage/compression/bitpacking_int128.cpp index 838d4cc2e9..7a72902753 100644 --- a/src/storage/compression/bitpacking_int128.cpp +++ b/src/storage/compression/bitpacking_int128.cpp @@ -112,7 +112,7 @@ static void packDelta128(const common::int128_t* __restrict in, uint32_t* __rest void Int128Packer::pack(const common::int128_t* __restrict in, uint32_t* __restrict out, uint8_t width) { - KU_ASSERT(width <= 128); + RYU_ASSERT(width <= 128); switch (width) { case 0: break; @@ -139,7 +139,7 @@ void Int128Packer::pack(const common::int128_t* __restrict in, uint32_t* __restr void Int128Packer::unpack(const uint32_t* __restrict in, common::int128_t* __restrict out, uint8_t width) { - KU_ASSERT(width <= 128); + RYU_ASSERT(width <= 128); switch (width) { case 0: unpackDelta0(out); diff --git a/src/storage/compression/bitpacking_utils.cpp b/src/storage/compression/bitpacking_utils.cpp index cd625797ca..42c4ca3ab8 100644 --- a/src/storage/compression/bitpacking_utils.cpp +++ b/src/storage/compression/bitpacking_utils.cpp @@ -17,7 +17,7 @@ void unpackSingleField(const CompressedType* __restrict in, UncompressedType* __ *out = static_cast(in[0]) >> shiftRight; } else { unpackSingleField(in, out, delta, shiftRight); - KU_ASSERT( + RYU_ASSERT( sizeof(UncompressedType) * 8 > compressed_field * compressedFieldSizeBits - shiftRight); *out |= static_cast(in[compressed_field]) << (compressed_field * compressedFieldSizeBits - shiftRight); @@ -78,7 +78,7 @@ void packSingleField(const UncompressedType in, CompressedType* __restrict out, setValueForBitsMatchingMask(out[0], in, mask, shiftLeft); } else { packSingleField(in, out, delta, shiftLeft, mask); - KU_ASSERT( + RYU_ASSERT( sizeof(UncompressedType) * 8 > compressed_field * compressedFieldSizeBits - shiftLeft); setValueForBitsMatchingMask(out[compressed_field], in, mask, diff --git a/src/storage/compression/compression.cpp b/src/storage/compression/compression.cpp index cd766c02fe..a342541e83 100644 --- a/src/storage/compression/compression.cpp +++ b/src/storage/compression/compression.cpp @@ -32,7 +32,7 @@ namespace storage { template auto getTypedMinMax(std::span data, const NullMask* nullMask, uint64_t nullMaskOffset) { std::optional min, max; - KU_ASSERT(data.size() > 0); + RYU_ASSERT(data.size() > 0); if (!nullMask || nullMask->hasNoNullsGuarantee()) { auto [minRaw, maxRaw] = std::minmax_element(data.begin(), data.end()); min = StorageValue(*minRaw); @@ -69,7 +69,7 @@ uint32_t getDataTypeSizeInChunk(const common::PhysicalTypeID& dataType) { } default: { auto size = PhysicalTypeUtils::getFixedTypeSize(dataType); - KU_ASSERT(size <= RYU_PAGE_SIZE); + RYU_ASSERT(size <= RYU_PAGE_SIZE); return size; } } @@ -121,7 +121,7 @@ CompressionMetadata::CompressionMetadata(StorageValue min, StorageValue max, } const CompressionMetadata& CompressionMetadata::getChild(offset_t idx) const { - KU_ASSERT(idx < getChildCount(compression)); + RYU_ASSERT(idx < getChildCount(compression)); return children[idx]; } @@ -156,7 +156,7 @@ void CompressionMetadata::serialize(Serializer& serializer) const { floatMetadata()->serialize(serializer); } - KU_ASSERT(children.size() == getChildCount(compression)); + RYU_ASSERT(children.size() == getChildCount(compression)); for (size_t i = 0; i < children.size(); ++i) { children[i].serialize(serializer); } @@ -404,7 +404,7 @@ std::optional ConstantCompression::analyze(const ColumnChun case PhysicalTypeID::INT128: { uint8_t size = chunk.getNumBytesPerValue(); StorageValue value{}; - KU_ASSERT(size <= sizeof(value.unsignedInt)); + RYU_ASSERT(size <= sizeof(value.unsignedInt)); // If there are no values, or only one value, we will always use constant compression // since the loop won't execute for (auto i = 1u; i < chunk.getNumValues(); i++) { @@ -447,7 +447,7 @@ std::string CompressionMetadata::toString(const PhysicalTypeID physicalType) con getChild(BITPACKING_CHILD_IDX)) .bitWidth; }, - [](auto) -> uint8_t { KU_UNREACHABLE; }); + [](auto) -> uint8_t { RYU_UNREACHABLE; }); return stringFormat("FLOAT_COMPRESSION[{}], {} Exceptions", bitWidth, floatMetadata()->exceptionCount); } @@ -457,10 +457,10 @@ std::string CompressionMetadata::toString(const PhysicalTypeID physicalType) con [&](common::internalID_t) { return IntegerBitpacking::getPackingInfo(*this).bitWidth; }, - [](bool) -> uint8_t { KU_UNREACHABLE; }, + [](bool) -> uint8_t { RYU_UNREACHABLE; }, [&]( T) { return IntegerBitpacking::getPackingInfo(*this).bitWidth; }, - [](auto) -> uint8_t { KU_UNREACHABLE; }); + [](auto) -> uint8_t { RYU_UNREACHABLE; }); return stringFormat("INTEGER_BITPACKING[{}]", bitWidth); } case CompressionType::BOOLEAN_BITPACKING: { @@ -470,7 +470,7 @@ std::string CompressionMetadata::toString(const PhysicalTypeID physicalType) con return "CONSTANT"; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -579,7 +579,7 @@ bool IntegerBitpacking::canUpdateInPlace(std::span values, uint64_t nullMaskOffset) { auto info = getPackingInfo(metadata); auto [min, max] = getTypedMinMax(values, nullMask ? &*nullMask : nullptr, nullMaskOffset); - KU_ASSERT((min && max) || (!min && !max)); + RYU_ASSERT((min && max) || (!min && !max)); // If all values are null update can trivially be done in-place if (!min) { return true; @@ -640,7 +640,7 @@ template void IntegerBitpacking::setValuesFromUncompressed(const uint8_t* srcBuffer, offset_t posInSrc, uint8_t* dstBuffer, offset_t posInDst, offset_t numValues, const CompressionMetadata& metadata, const NullMask* nullMask) const { - KU_UNUSED(nullMask); + RYU_UNUSED(nullMask); auto header = getPackingInfo(metadata); @@ -648,7 +648,7 @@ void IntegerBitpacking::setValuesFromUncompressed(const uint8_t* srcBuffer, o // non-zero offset However we don't care about the value stored for null values // Currently they will be mangled by storage+recovery (underflow in the subtraction // below) - KU_ASSERT(numValues == static_cast(std::ranges::count_if( + RYU_ASSERT(numValues == static_cast(std::ranges::count_if( std::ranges::iota_view{posInSrc, posInSrc + numValues}, [srcBuffer, &metadata, nullMask](offset_t i) { auto value = reinterpret_cast(srcBuffer)[i]; @@ -696,7 +696,7 @@ template void IntegerBitpacking::getValues(const uint8_t* chunkStart, uint8_t pos, uint8_t* dst, uint8_t numValuesToRead, const BitpackInfo& header) const { const size_t maxReadIndex = pos + numValuesToRead; - KU_ASSERT(maxReadIndex <= CHUNK_SIZE); + RYU_ASSERT(maxReadIndex <= CHUNK_SIZE); for (size_t i = pos; i < maxReadIndex; i++) { // Always use unsigned version of unpacker to prevent sign-bit filling when right @@ -740,7 +740,7 @@ uint64_t IntegerBitpacking::compressNextPage(const uint8_t*& srcBuffer, return Uncompressed(sizeof(T)).compressNextPage(srcBuffer, numValuesRemaining, dstBuffer, dstBufferSize, metadata); } - KU_ASSERT(metadata.compression == CompressionType::INTEGER_BITPACKING); + RYU_ASSERT(metadata.compression == CompressionType::INTEGER_BITPACKING); auto info = getPackingInfo(metadata); auto bitWidth = info.bitWidth; @@ -751,8 +751,8 @@ uint64_t IntegerBitpacking::compressNextPage(const uint8_t*& srcBuffer, // Round up to nearest byte auto sizeToCompress = numValuesToCompress * bitWidth / 8 + (numValuesToCompress * bitWidth % 8 != 0); - KU_ASSERT(dstBufferSize >= CHUNK_SIZE); - KU_ASSERT(dstBufferSize >= sizeToCompress); + RYU_ASSERT(dstBufferSize >= CHUNK_SIZE); + RYU_ASSERT(dstBufferSize >= sizeToCompress); // This might overflow the source buffer if there are fewer values remaining than the chunk // size so we stop at the end of the last full chunk and use a temporary array to avoid // overflow. @@ -954,7 +954,7 @@ void ReadCompressedValuesFromPageToVector::operator()(const uint8_t* frame, Page return booleanBitpacking.decompressFromPage(frame, pageCursor.elemPosInPage, resultVector->getData(), posInVector, numValuesToRead, metadata); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -1034,7 +1034,7 @@ void ReadCompressedValuesFromPage::operator()(const uint8_t* frame, PageCursor& return booleanBitpacking.copyFromPage(frame, pageCursor.elemPosInPage, result, startPosInResult, numValuesToRead, metadata); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -1081,7 +1081,7 @@ void WriteCompressedValuesToPage::operator()(uint8_t* frame, uint16_t posInFrame metadata); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -1130,7 +1130,7 @@ bool StorageValue::gt(const StorageValue& other, common::PhysicalTypeID type) co case common::PhysicalTypeID::DOUBLE: return this->floatVal > other.floatVal; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/src/storage/compression/float_compression.cpp b/src/storage/compression/float_compression.cpp index 978f8ba558..7fd9bd8654 100644 --- a/src/storage/compression/float_compression.cpp +++ b/src/storage/compression/float_compression.cpp @@ -62,7 +62,7 @@ FloatCompression::FloatCompression() template uint64_t FloatCompression::compressNextPage(const uint8_t*&, uint64_t, uint8_t*, uint64_t, const struct CompressionMetadata&) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } template @@ -70,7 +70,7 @@ uint64_t FloatCompression::compressNextPageWithExceptions(const uint8_t*& src uint64_t srcOffset, uint64_t numValuesRemaining, uint8_t* dstBuffer, uint64_t dstBufferSize, EncodeExceptionView exceptionBuffer, [[maybe_unused]] uint64_t exceptionBufferSize, uint64_t& exceptionCount, const struct CompressionMetadata& metadata) const { - KU_ASSERT(metadata.compression == CompressionType::ALP); + RYU_ASSERT(metadata.compression == CompressionType::ALP); const size_t numValuesToCompress = std::min(numValuesRemaining, numValues(dstBufferSize, metadata)); @@ -85,7 +85,7 @@ uint64_t FloatCompression::compressNextPageWithExceptions(const uint8_t*& src alp::AlpDecode::decode_value(encodedValue, floatMetadata->fac, floatMetadata->exp); if (floatValue != decodedValue) { - KU_ASSERT( + RYU_ASSERT( (exceptionCount + 1) * EncodeException::sizeInBytes() <= exceptionBufferSize); exceptionBuffer.setValue( {.value = floatValue, @@ -145,7 +145,7 @@ void FloatCompression::setValuesFromUncompressed(const uint8_t* srcBuffer, const common::NullMask* nullMask) const { // each individual value that is being updated should be able to be updated in place RUNTIME_CHECK(InPlaceUpdateLocalState localUpdateState{}); - KU_ASSERT(numValues == + RYU_ASSERT(numValues == static_cast( std::ranges::count_if(std::ranges::iota_view{srcOffset, srcOffset + numValues}, [&localUpdateState, srcBuffer, &metadata, nullMask](common::offset_t i) { diff --git a/src/storage/disk_array.cpp b/src/storage/disk_array.cpp index c1fe0f31bd..d1508b1ca7 100644 --- a/src/storage/disk_array.cpp +++ b/src/storage/disk_array.cpp @@ -28,7 +28,7 @@ static PageCursor getAPIdxAndOffsetInAP(const PageStorageInfo& info, uint64_t id PageStorageInfo::PageStorageInfo(uint64_t elementSize) : alignedElementSize{std::bit_ceil(elementSize)}, numElementsPerPage{RYU_PAGE_SIZE / alignedElementSize} { - KU_ASSERT(elementSize <= RYU_PAGE_SIZE); + RYU_ASSERT(elementSize <= RYU_PAGE_SIZE); } PIPWrapper::PIPWrapper(const FileHandle& fileHandle, page_idx_t pipPageIdx) @@ -85,7 +85,7 @@ bool DiskArrayInternal::checkOutOfBoundAccess(TransactionType trxType, uint64_t void DiskArrayInternal::get(uint64_t idx, const Transaction* transaction, std::span val) { std::shared_lock sLck{diskArraySharedMtx}; - KU_ASSERT(checkOutOfBoundAccess(transaction->getType(), idx)); + RYU_ASSERT(checkOutOfBoundAccess(transaction->getType(), idx)); auto apCursor = getAPIdxAndOffsetInAP(storageInfo, idx); page_idx_t apPageIdx = getAPPageIdxNoLock(apCursor.pageIdx, transaction->getType()); if (transaction->getType() != TransactionType::CHECKPOINT || !hasTransactionalUpdates || @@ -124,7 +124,7 @@ void DiskArrayInternal::update(const Transaction* transaction, uint64_t idx, std::span val) { std::unique_lock xLck{diskArraySharedMtx}; hasTransactionalUpdates = true; - KU_ASSERT(checkOutOfBoundAccess(transaction->getType(), idx)); + RYU_ASSERT(checkOutOfBoundAccess(transaction->getType(), idx)); auto apCursor = getAPIdxAndOffsetInAP(storageInfo, idx); // TODO: We are currently supporting only DiskArrays that can grow in size and not // those that can shrink in size. That is why we can use @@ -166,7 +166,7 @@ void DiskArrayInternal::setNextPIPPageIDxOfPIPNoLock(uint64_t pipIdxOfPreviousPI if (pipIdxOfPreviousPIP == pips.size() - 1) { pipUpdates.updatedLastPIP->pipContents.nextPipPageIdx = nextPIPPageIdx; } else { - KU_ASSERT(pipIdxOfPreviousPIP >= pips.size() && + RYU_ASSERT(pipIdxOfPreviousPIP >= pips.size() && pipUpdates.newPIPs.size() > pipIdxOfPreviousPIP - pips.size()); pipUpdates.newPIPs[pipIdxOfPreviousPIP - pips.size()].pipContents.nextPipPageIdx = nextPIPPageIdx; @@ -181,7 +181,7 @@ page_idx_t DiskArrayInternal::getAPPageIdxNoLock(page_idx_t apIdx, TransactionTy } else if (pipIdx == pips.size() - 1 && pipUpdates.updatedLastPIP) { return pipUpdates.updatedLastPIP->pipContents.pageIdxs[offsetInPIP]; } else { - KU_ASSERT(pipIdx >= pips.size() && pipIdx - pips.size() < pipUpdates.newPIPs.size()); + RYU_ASSERT(pipIdx >= pips.size() && pipIdx - pips.size() < pipUpdates.newPIPs.size()); return pipUpdates.newPIPs[pipIdx - pips.size()].pipContents.pageIdxs[offsetInPIP]; } } @@ -273,7 +273,7 @@ DiskArrayInternal::getAPPageIdxAndAddAPToPIPIfNecessaryForWriteTrxNoLock( false /* is not inserting a new ap page */); } else { // apIdx even if it's being inserted should never be > updatedDiskArrayHeader->numAPs. - KU_ASSERT(apIdx == getNumAPs(headerForWriteTrx)); + RYU_ASSERT(apIdx == getNumAPs(headerForWriteTrx)); // We need to add a new AP. This may further cause a new pip to be inserted, which is // handled by the if/else-if/else branch below. page_idx_t newAPPageIdx = pageAllocator.allocatePage(); @@ -284,7 +284,7 @@ DiskArrayInternal::getAPPageIdxAndAddAPToPIPIfNecessaryForWriteTrxNoLock( uint64_t pipIdx = pipIdxAndOffsetOfNewAP.first; uint64_t offsetOfNewAPInPIP = pipIdxAndOffsetOfNewAP.second; if (pipIdx < pips.size()) { - KU_ASSERT(pipIdx == pips.size() - 1); + RYU_ASSERT(pipIdx == pips.size() - 1); // We do not need to insert a new pip and we need to add newAPPageIdx to a PIP that // existed before this transaction started. if (!pipUpdates.updatedLastPIP.has_value()) { @@ -309,7 +309,7 @@ DiskArrayInternal::getAPPageIdxAndAddAPToPIPIfNecessaryForWriteTrxNoLock( } DiskArrayInternal::WriteIterator& DiskArrayInternal::WriteIterator::seek(size_t newIdx) { - KU_ASSERT(newIdx < diskArray.headerForWriteTrx.numElements); + RYU_ASSERT(newIdx < diskArray.headerForWriteTrx.numElements); auto oldPageIdx = apCursor.pageIdx; idx = newIdx; apCursor = getAPIdxAndOffsetInAP(diskArray.storageInfo, idx); @@ -377,14 +377,14 @@ page_idx_t DiskArrayInternal::getAPIdx(uint64_t idx) const { // This changes the contents directly in memory and not on disk (nor on the wal) uint8_t* BlockVectorInternal::operator[](uint64_t idx) const { auto apCursor = getAPIdxAndOffsetInAP(storageInfo, idx); - KU_ASSERT(apCursor.pageIdx < inMemArrayPages.size()); + RYU_ASSERT(apCursor.pageIdx < inMemArrayPages.size()); return inMemArrayPages[apCursor.pageIdx]->getData() + apCursor.elemPosInPage; } void BlockVectorInternal::resize(uint64_t newNumElements, const element_construct_func_t& defaultConstructor) { auto oldNumElements = numElements; - KU_ASSERT(newNumElements >= oldNumElements); + RYU_ASSERT(newNumElements >= oldNumElements); uint64_t oldNumArrayPages = inMemArrayPages.size(); uint64_t newNumArrayPages = getNumArrayPagesNeededForElements(newNumElements); for (auto i = oldNumArrayPages; i < newNumArrayPages; ++i) { diff --git a/src/storage/disk_array_collection.cpp b/src/storage/disk_array_collection.cpp index 06fb7fd52b..fed53c80af 100644 --- a/src/storage/disk_array_collection.cpp +++ b/src/storage/disk_array_collection.cpp @@ -91,7 +91,7 @@ size_t DiskArrayCollection::addDiskArray() { } auto& headerPage = *headersForWriteTrx[pageIdx]; - KU_ASSERT(headerPage.numHeaders < HeaderPage::NUM_HEADERS_PER_PAGE); + RYU_ASSERT(headerPage.numHeaders < HeaderPage::NUM_HEADERS_PER_PAGE); auto indexInPage = headerPage.numHeaders; headerPage.headers[indexInPage] = DiskArrayHeader(); headerPage.numHeaders++; diff --git a/src/storage/file_handle.cpp b/src/storage/file_handle.cpp index 6e4831c8b0..0971460463 100644 --- a/src/storage/file_handle.cpp +++ b/src/storage/file_handle.cpp @@ -98,7 +98,7 @@ uint8_t* FileHandle::pinPage(page_idx_t pageIdx, PageReadPolicy readPolicy) { void FileHandle::optimisticReadPage(page_idx_t pageIdx, const std::function& readOp) { if (isInMemoryMode()) { - KU_ASSERT( + RYU_ASSERT( PageState::getState(getPageState(pageIdx)->getStateAndVersion()) == PageState::LOCKED); const auto frame = bm->getFrame(*this, pageIdx); readOp(frame); @@ -123,7 +123,7 @@ void FileHandle::resetToZeroPagesAndPageCapacity() { } uint8_t* FileHandle::getFrame(page_idx_t pageIdx) { - KU_ASSERT(pageIdx < numPages); + RYU_ASSERT(pageIdx < numPages); return bm->getFrame(*this, pageIdx); } @@ -138,7 +138,7 @@ void FileHandle::removePageIdxAndTruncateIfNecessary(page_idx_t pageIdx) { if (numPageGroups == frameGroupIdxes.size()) { return; } - KU_ASSERT(numPageGroups < frameGroupIdxes.size()); + RYU_ASSERT(numPageGroups < frameGroupIdxes.size()); frameGroupIdxes.resize(numPageGroups); pageCapacity = numPageGroups * StorageConstants::PAGE_GROUP_SIZE; } diff --git a/src/storage/free_space_manager.cpp b/src/storage/free_space_manager.cpp index f0401e96fe..c6bb07b37e 100644 --- a/src/storage/free_space_manager.cpp +++ b/src/storage/free_space_manager.cpp @@ -23,7 +23,7 @@ FreeSpaceManager::FreeSpaceManager() : freeLists{}, numEntries(0), needClearEvic common::idx_t FreeSpaceManager::getLevel(common::page_idx_t numPages) { // level is exponent of largest power of 2 that is <= numPages // e.g. 2 -> level 1, 5 -> level 2 - KU_ASSERT(numPages > 0); + RYU_ASSERT(numPages > 0); return common::CountZeros::Trailing(std::bit_floor(numPages)); } @@ -32,9 +32,9 @@ bool FreeSpaceManager::entryCmp(const PageRange& a, const PageRange& b) { } void FreeSpaceManager::addFreePages(PageRange entry) { - KU_ASSERT(entry.numPages > 0); + RYU_ASSERT(entry.numPages > 0); const auto entryLevel = getLevel(entry.numPages); - KU_ASSERT(!getFreeList(freeLists, entryLevel).contains(entry)); + RYU_ASSERT(!getFreeList(freeLists, entryLevel).contains(entry)); getFreeList(freeLists, entryLevel).insert(entry); ++numEntries; } @@ -71,7 +71,7 @@ std::optional FreeSpaceManager::popFreePages(common::page_idx_t numPa } PageRange FreeSpaceManager::splitPageRange(PageRange chunk, common::page_idx_t numRequiredPages) { - KU_ASSERT(chunk.numPages >= numRequiredPages); + RYU_ASSERT(chunk.numPages >= numRequiredPages); PageRange ret{chunk.startPageIdx, numRequiredPages}; if (numRequiredPages < chunk.numPages) { PageRange remainingEntry{chunk.startPageIdx + numRequiredPages, @@ -152,7 +152,7 @@ void FreeSpaceManager::serializeInternal(ValueProcessor& ser) const { serializeCheckpointedEntries(freeLists, ser); [[maybe_unused]] const auto numUncheckpointedEntries = serializeUncheckpointedEntries(uncheckpointedFreePageRanges, ser); - KU_ASSERT(numCheckpointedEntries + numUncheckpointedEntries == numEntries); + RYU_ASSERT(numCheckpointedEntries + numUncheckpointedEntries == numEntries); } common::page_idx_t FreeSpaceManager::getMaxNumPagesForSerialization() const { @@ -223,7 +223,7 @@ void FreeSpaceManager::mergePageRanges(free_list_t newInitialEntries, FileHandle PageRange prevEntry = allEntries[0]; for (common::row_idx_t i = 1; i < allEntries.size(); ++i) { const auto& entry = allEntries[i]; - KU_ASSERT(prevEntry.startPageIdx + prevEntry.numPages <= entry.startPageIdx); + RYU_ASSERT(prevEntry.startPageIdx + prevEntry.numPages <= entry.startPageIdx); if (prevEntry.startPageIdx + prevEntry.numPages == entry.startPageIdx) { prevEntry.numPages += entry.numPages; } else { @@ -248,12 +248,12 @@ common::row_idx_t FreeSpaceManager::getNumEntries() const { std::vector FreeSpaceManager::getEntries(common::row_idx_t startOffset, common::row_idx_t endOffset) const { - KU_ASSERT(endOffset >= startOffset); + RYU_ASSERT(endOffset >= startOffset); std::vector ret; FreeEntryIterator it{freeLists}; it.advance(startOffset); while (ret.size() < endOffset - startOffset) { - KU_ASSERT(!it.done()); + RYU_ASSERT(!it.done()); ret.push_back(*it); ++it; } @@ -274,7 +274,7 @@ void FreeEntryIterator::advance(common::row_idx_t numEntries) { } void FreeEntryIterator::operator++() { - KU_ASSERT(freeListIdx < freeLists.size()); + RYU_ASSERT(freeListIdx < freeLists.size()); ++freeListIt; if (freeListIt == freeLists[freeListIdx].end()) { ++freeListIdx; @@ -296,7 +296,7 @@ void FreeEntryIterator::advanceFreeListIdx() { } PageRange FreeEntryIterator::operator*() const { - KU_ASSERT(freeListIdx < freeLists.size() && freeListIt != freeLists[freeListIdx].end()); + RYU_ASSERT(freeListIdx < freeLists.size() && freeListIt != freeLists[freeListIdx].end()); return *freeListIt; } diff --git a/src/storage/index/hash_index.cpp b/src/storage/index/hash_index.cpp index cc79526cb7..73568bb49f 100644 --- a/src/storage/index/hash_index.cpp +++ b/src/storage/index/hash_index.cpp @@ -173,7 +173,7 @@ void HashIndex::splitSlots(PageAllocator& pageAllocator, const Transaction* t const hash_t hash = this->hashStored(transaction, key); const auto newSlotId = hash & header.higherLevelHashMask; if (newSlotId != header.nextSplitSlotId) { - KU_ASSERT(newSlotId == newSlotIterator.idx()); + RYU_ASSERT(newSlotId == newSlotIterator.idx()); newSlot->entries[newEntryPos] = originalSlot->entries[originalEntryPos]; newSlot->header.setEntryValid(newEntryPos, originalSlot->header.fingerprints[originalEntryPos]); @@ -329,7 +329,7 @@ void HashIndex::mergeBulkInserts(PageAllocator& pageAllocator, const Transact if (diskSlotId / NUM_SLOTS_PER_PAGE == diskSlotPage) { auto merged = mergeSlot(pageAllocator, transaction, partitionedEntries[i], diskSlotIterator, diskOverflowSlotIterator, diskSlotId); - KU_ASSERT(merged <= partitionedEntries[i].size()); + RYU_ASSERT(merged <= partitionedEntries[i].size()); partitionedEntries[i].resize(partitionedEntries[i].size() - merged); if (partitionedEntries[i].empty()) { done[i] = true; @@ -343,7 +343,7 @@ void HashIndex::mergeBulkInserts(PageAllocator& pageAllocator, const Transact } // TODO(Guodong): Fix this assertion statement which doesn't count the entries in // deleteLocalStorage. - // KU_ASSERT(originalNumEntries + insertLocalStorage.getIndexHeader().numEntries == + // RYU_ASSERT(originalNumEntries + insertLocalStorage.getIndexHeader().numEntries == // indexHeaderForWriteTrx.numEntries); } @@ -357,7 +357,7 @@ size_t HashIndex::mergeSlot(PageAllocator& pageAllocator, const Transaction* // mergeSlot should only be called when there is at least one entry for the given disk slot id // in the slot to merge OnDiskSlotType* diskSlot = &*diskSlotIterator.seek(diskSlotId); - KU_ASSERT(diskSlot->header.nextOvfSlotId == SlotHeader::INVALID_OVERFLOW_SLOT_ID || + RYU_ASSERT(diskSlot->header.nextOvfSlotId == SlotHeader::INVALID_OVERFLOW_SLOT_ID || diskOverflowSlotIterator.size() > diskSlot->header.nextOvfSlotId); // Merge slot from local storage to an existing slot. size_t merged = 0; @@ -375,22 +375,22 @@ size_t HashIndex::mergeSlot(PageAllocator& pageAllocator, const Transaction* diskSlot->header.nextOvfSlotId = diskOverflowSlotIterator.size(); // This may invalidate diskSlot diskOverflowSlotIterator.pushBack(pageAllocator, transaction, OnDiskSlotType()); - KU_ASSERT( + RYU_ASSERT( diskSlot->header.nextOvfSlotId == SlotHeader::INVALID_OVERFLOW_SLOT_ID || diskOverflowSlotIterator.size() > diskSlot->header.nextOvfSlotId); } else { diskOverflowSlotIterator.seek(diskSlot->header.nextOvfSlotId); - KU_ASSERT( + RYU_ASSERT( diskSlot->header.nextOvfSlotId == SlotHeader::INVALID_OVERFLOW_SLOT_ID || diskOverflowSlotIterator.size() > diskSlot->header.nextOvfSlotId); } diskSlot = &*diskOverflowSlotIterator; // Check to make sure we're not looping - KU_ASSERT(diskOverflowSlotIterator.idx() != diskSlot->header.nextOvfSlotId); + RYU_ASSERT(diskOverflowSlotIterator.idx() != diskSlot->header.nextOvfSlotId); diskEntryPos = 0; } } - KU_ASSERT(diskEntryPos < PERSISTENT_SLOT_CAPACITY); + RYU_ASSERT(diskEntryPos < PERSISTENT_SLOT_CAPACITY); if constexpr (std::is_same_v) { auto* inMemEntry = it->entry; auto kuString = overflowFileHandle->writeString(&pageAllocator, inMemEntry->key); @@ -399,13 +399,13 @@ size_t HashIndex::mergeSlot(PageAllocator& pageAllocator, const Transaction* diskSlot->entries[diskEntryPos] = *it->entry; } diskSlot->header.setEntryValid(diskEntryPos, it->fingerprint); - KU_ASSERT([&]() { + RYU_ASSERT([&]() { const auto& key = it->entry->key; const auto hash = hashStored(transaction, key); const auto primarySlot = HashIndexUtils::getPrimarySlotIdForHash(indexHeaderForWriteTrx, hash); - KU_ASSERT(it->fingerprint == HashIndexUtils::getFingerprintForHash(hash)); - KU_ASSERT(primarySlot == diskSlotId); + RYU_ASSERT(it->fingerprint == HashIndexUtils::getFingerprintForHash(hash)); + RYU_ASSERT(primarySlot == diskSlotId); return true; }()); indexHeaderForWriteTrx.numEntries++; @@ -480,7 +480,7 @@ PrimaryKeyIndex::PrimaryKeyIndex(IndexInfo indexInfo, std::unique_ptrstorageInfo->cast(); if (hashIndexStorageInfo.firstHeaderPage == INVALID_PAGE_IDX) { - KU_ASSERT(hashIndexStorageInfo.overflowHeaderPage == INVALID_PAGE_IDX); + RYU_ASSERT(hashIndexStorageInfo.overflowHeaderPage == INVALID_PAGE_IDX); hashIndexHeadersForReadTrx.resize(NUM_HASH_INDEXES); hashIndexHeadersForWriteTrx.resize(NUM_HASH_INDEXES); hashIndexDiskArrays = std::make_unique(*pageAllocator.getDataFH(), @@ -504,7 +504,7 @@ PrimaryKeyIndex::PrimaryKeyIndex(IndexInfo indexInfo, std::unique_ptr(*pageAllocator.getDataFH(), *shadowFile, hashIndexStorageInfo.firstHeaderPage + @@ -516,7 +516,7 @@ PrimaryKeyIndex::PrimaryKeyIndex(IndexInfo indexInfo, std::unique_ptr(mm); @@ -542,26 +542,26 @@ void PrimaryKeyIndex::initOverflowAndSubIndices(bool inMemMode, MemoryManager& m hashIndexHeadersForWriteTrx[i])); } }, - [&](auto) { KU_UNREACHABLE; }); + [&](auto) { RYU_UNREACHABLE; }); } bool PrimaryKeyIndex::lookup(const Transaction* trx, ValueVector* keyVector, uint64_t vectorPos, offset_t& result, visible_func isVisible) { bool retVal = false; - KU_ASSERT(indexInfo.keyDataTypes.size() == 1); + RYU_ASSERT(indexInfo.keyDataTypes.size() == 1); TypeUtils::visit( indexInfo.keyDataTypes[0], [&](T) { T key = keyVector->getValue(vectorPos); retVal = lookup(trx, key, result, isVisible); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return retVal; } void PrimaryKeyIndex::commitInsert(Transaction* transaction, const ValueVector& nodeIDVector, const std::vector& indexVectors, Index::InsertState& insertState) { - KU_ASSERT(indexVectors.size() == 1); + RYU_ASSERT(indexVectors.size() == 1); const auto& pkVector = *indexVectors[0]; const auto& pkInsertState = insertState.cast(); for (auto i = 0u; i < nodeIDVector.state->getSelSize(); i++) { @@ -581,19 +581,19 @@ void PrimaryKeyIndex::commitInsert(Transaction* transaction, const ValueVector& bool PrimaryKeyIndex::insert(const Transaction* transaction, const ValueVector* keyVector, uint64_t vectorPos, offset_t value, visible_func isVisible) { bool result = false; - KU_ASSERT(indexInfo.keyDataTypes.size() == 1); + RYU_ASSERT(indexInfo.keyDataTypes.size() == 1); TypeUtils::visit( indexInfo.keyDataTypes[0], [&](T) { T key = keyVector->getValue(vectorPos); result = insert(transaction, key, value, isVisible); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return result; } void PrimaryKeyIndex::delete_(ValueVector* keyVector) { - KU_ASSERT(indexInfo.keyDataTypes.size() == 1); + RYU_ASSERT(indexInfo.keyDataTypes.size() == 1); TypeUtils::visit( indexInfo.keyDataTypes[0], [&](T) { @@ -606,7 +606,7 @@ void PrimaryKeyIndex::delete_(ValueVector* keyVector) { delete_(key); } }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); } void PrimaryKeyIndex::checkpointInMemory() { @@ -647,7 +647,7 @@ void PrimaryKeyIndex::writeHeaders(PageAllocator& pageAllocator) const { } }); } - KU_ASSERT(headerIdx == NUM_HASH_INDEXES); + RYU_ASSERT(headerIdx == NUM_HASH_INDEXES); } void PrimaryKeyIndex::rollbackCheckpoint() { diff --git a/src/storage/index/in_mem_hash_index.cpp b/src/storage/index/in_mem_hash_index.cpp index a0813f04fe..3de6f578c8 100644 --- a/src/storage/index/in_mem_hash_index.cpp +++ b/src/storage/index/in_mem_hash_index.cpp @@ -124,7 +124,7 @@ void InMemHashIndex::splitSlot() { for (auto entryPos = 0u; entryPos < SLOT_CAPACITY; entryPos++) { if (!originalSlot.slot->header.isEntryValid(entryPos)) { // Check that this function leaves no gaps - KU_ASSERT(originalSlot.slot->header.numEntries() == + RYU_ASSERT(originalSlot.slot->header.numEntries() == std::countr_one(originalSlot.slot->header.validityMask)); // There should be no gaps, so when we encounter an invalid entry we can return // early @@ -141,7 +141,7 @@ void InMemHashIndex::splitSlot() { auto newOvfSlotId = allocateAOSlot(); newSlot.slot->header.nextOvfSlotId = newOvfSlotId; [[maybe_unused]] bool hadNextSlot = nextChainedSlot(newSlot); - KU_ASSERT(hadNextSlot); + RYU_ASSERT(hadNextSlot); newSlotPos = 0; } newSlot.slot->entries[newSlotPos] = entry; @@ -159,7 +159,7 @@ void InMemHashIndex::splitSlot() { // There should always be another slot since we can't split more entries // than there were to begin with [[maybe_unused]] bool hadNextSlot = nextChainedSlot(originalSlotForInsert); - KU_ASSERT(hadNextSlot); + RYU_ASSERT(hadNextSlot); } } originalSlotForInsert.slot->entries[entryPosToInsert] = entry; @@ -167,7 +167,7 @@ void InMemHashIndex::splitSlot() { originalSlot.slot->header.setEntryInvalid(entryPos); } } - KU_ASSERT(originalSlot.slot->header.numEntries() == + RYU_ASSERT(originalSlot.slot->header.numEntries() == std::countr_one(originalSlot.slot->header.validityMask)); } while (nextChainedSlot(originalSlot)); @@ -179,9 +179,9 @@ template void InMemHashIndex::addFreeOverflowSlot(InMemSlotType& overflowSlot, SlotInfo slotInfo) { // This function should only be called on slots that can be directly inserted into the free slot // list - KU_ASSERT(slotInfo.slotId != SlotHeader::INVALID_OVERFLOW_SLOT_ID); - KU_ASSERT(overflowSlot.header.nextOvfSlotId == SlotHeader::INVALID_OVERFLOW_SLOT_ID); - KU_ASSERT(slotInfo.slotType == SlotType::OVF); + RYU_ASSERT(slotInfo.slotId != SlotHeader::INVALID_OVERFLOW_SLOT_ID); + RYU_ASSERT(overflowSlot.header.nextOvfSlotId == SlotHeader::INVALID_OVERFLOW_SLOT_ID); + RYU_ASSERT(slotInfo.slotType == SlotType::OVF); overflowSlot.header.nextOvfSlotId = indexHeader.firstFreeOverflowSlotId; indexHeader.firstFreeOverflowSlotId = slotInfo.slotId; numFreeSlots++; @@ -205,7 +205,7 @@ void InMemHashIndex::reclaimOverflowSlots(SlotIterator iter) { lastNonEmptySlot->header.nextOvfSlotId = SlotHeader::INVALID_OVERFLOW_SLOT_ID; while (iter.slotInfo != HashIndexUtils::INVALID_OVF_INFO) { // Remove empty overflow slots from slot chain - KU_ASSERT(iter.slot->header.numEntries() == 0); + RYU_ASSERT(iter.slot->header.numEntries() == 0); auto slotInfo = iter.slotInfo; auto slot = clearNextOverflowAndAdvanceIter(iter); if (slotInfo.slotType == SlotType::OVF) { @@ -249,9 +249,9 @@ uint32_t InMemHashIndex::allocateAOSlot() { auto& slot = (*oSlots)[freeOSlotId]; // Remove slot from the free slot chain indexHeader.firstFreeOverflowSlotId = slot.header.nextOvfSlotId; - KU_ASSERT(slot.header.numEntries() == 0); + RYU_ASSERT(slot.header.numEntries() == 0); slot.header.nextOvfSlotId = SlotHeader::INVALID_OVERFLOW_SLOT_ID; - KU_ASSERT(numFreeSlots > 0); + RYU_ASSERT(numFreeSlots > 0); numFreeSlots--; return freeOSlotId; } diff --git a/src/storage/index/index.cpp b/src/storage/index/index.cpp index 502b3af173..cd003032bd 100644 --- a/src/storage/index/index.cpp +++ b/src/storage/index/index.cpp @@ -75,13 +75,13 @@ IndexHolder::IndexHolder(IndexInfo indexInfo, std::unique_ptr storage void IndexHolder::serialize(common::Serializer& ser) const { if (loaded) { - KU_ASSERT(index); + RYU_ASSERT(index); index->serialize(ser); } else { indexInfo.serialize(ser); ser.write(storageInfoBufferSize); if (storageInfoBufferSize > 0) { - KU_ASSERT(storageInfoBuffer); + RYU_ASSERT(storageInfoBuffer); ser.write(storageInfoBuffer.get(), storageInfoBufferSize); } } @@ -91,8 +91,8 @@ void IndexHolder::load(main::ClientContext* context, StorageManager* storageMana if (loaded) { return; } - KU_ASSERT(!index); - KU_ASSERT(storageInfoBuffer); + RYU_ASSERT(!index); + RYU_ASSERT(storageInfoBuffer); auto indexTypeOptional = StorageManager::Get(*context)->getIndexType(indexInfo.indexType); if (!indexTypeOptional.has_value()) { throw common::RuntimeException("No index type with name: " + indexInfo.indexType); diff --git a/src/storage/local_storage/local_node_table.cpp b/src/storage/local_storage/local_node_table.cpp index 0645193027..eece181b23 100644 --- a/src/storage/local_storage/local_node_table.cpp +++ b/src/storage/local_storage/local_node_table.cpp @@ -53,7 +53,7 @@ bool LocalNodeTable::isVisible(const Transaction* transaction, offset_t offset) offset_t LocalNodeTable::validateUniquenessConstraint(const Transaction* transaction, const ValueVector& pkVector) const { - KU_ASSERT(pkVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(pkVector.state->getSelVector().getSelSize() == 1); return hashIndex->lookup(pkVector, [&](offset_t offset_) { return isVisible(transaction, offset_); }); } @@ -61,7 +61,7 @@ offset_t LocalNodeTable::validateUniquenessConstraint(const Transaction* transac bool LocalNodeTable::insert(Transaction* transaction, TableInsertState& insertState) { auto& nodeInsertState = insertState.constCast(); const auto nodeOffset = startOffset + nodeGroups.getNumTotalRows(); - KU_ASSERT(nodeInsertState.pkVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeInsertState.pkVector.state->getSelVector().getSelSize() == 1); if (!hashIndex->insert(nodeInsertState.pkVector, nodeOffset, [&](offset_t offset) { return isVisible(transaction, offset); })) { const auto val = @@ -76,13 +76,13 @@ bool LocalNodeTable::insert(Transaction* transaction, TableInsertState& insertSt } bool LocalNodeTable::update(Transaction* transaction, TableUpdateState& updateState) { - KU_ASSERT(transaction->isDummy()); + RYU_ASSERT(transaction->isDummy()); const auto& nodeUpdateState = updateState.cast(); - KU_ASSERT(nodeUpdateState.nodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeUpdateState.nodeIDVector.state->getSelVector().getSelSize() == 1); const auto pos = nodeUpdateState.nodeIDVector.state->getSelVector()[0]; const auto offset = nodeUpdateState.nodeIDVector.readNodeOffset(pos); - KU_ASSERT(nodeUpdateState.columnID != table.cast().getPKColumnID()); - KU_ASSERT(offset >= startOffset); + RYU_ASSERT(nodeUpdateState.columnID != table.cast().getPKColumnID()); + RYU_ASSERT(offset >= startOffset); const auto [nodeGroupIdx, rowIdxInGroup] = StorageUtils::getQuotientRemainder(offset - startOffset, StorageConfig::NODE_GROUP_SIZE); const auto nodeGroup = nodeGroups.getNodeGroup(nodeGroupIdx); @@ -92,12 +92,12 @@ bool LocalNodeTable::update(Transaction* transaction, TableUpdateState& updateSt } bool LocalNodeTable::delete_(Transaction* transaction, TableDeleteState& deleteState) { - KU_ASSERT(transaction->isDummy()); + RYU_ASSERT(transaction->isDummy()); const auto& nodeDeleteState = deleteState.cast(); - KU_ASSERT(nodeDeleteState.nodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeDeleteState.nodeIDVector.state->getSelVector().getSelSize() == 1); const auto pos = nodeDeleteState.nodeIDVector.state->getSelVector()[0]; const auto offset = nodeDeleteState.nodeIDVector.readNodeOffset(pos); - KU_ASSERT(offset >= startOffset); + RYU_ASSERT(offset >= startOffset); hashIndex->delete_(nodeDeleteState.pkVector); const auto [nodeGroupIdx, rowIdxInGroup] = StorageUtils::getQuotientRemainder(offset - startOffset, StorageConfig::NODE_GROUP_SIZE); diff --git a/src/storage/local_storage/local_rel_table.cpp b/src/storage/local_storage/local_rel_table.cpp index 1465235c68..016fc99a21 100644 --- a/src/storage/local_storage/local_rel_table.cpp +++ b/src/storage/local_storage/local_rel_table.cpp @@ -42,7 +42,7 @@ bool LocalRelTable::insert(Transaction*, TableInsertState& state) { std::vector rowIndicesToInsertTo; for (auto& directedIndex : directedIndices) { const auto& nodeIDVector = insertState.getBoundNodeIDVector(directedIndex.direction); - KU_ASSERT(nodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeIDVector.state->getSelVector().getSelSize() == 1); auto nodePos = nodeIDVector.state->getSelVector()[0]; if (nodeIDVector.isNull(nodePos)) { return false; @@ -54,7 +54,7 @@ bool LocalRelTable::insert(Transaction*, TableInsertState& state) { const auto numRowsInLocalTable = localNodeGroup->getNumRows(); const auto relOffset = StorageConstants::MAX_NUM_ROWS_IN_TABLE + numRowsInLocalTable; const auto relIDVector = insertState.propertyVectors[0]; - KU_ASSERT(relIDVector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); + RYU_ASSERT(relIDVector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); const auto relIDPos = relIDVector->state->getSelVector()[0]; relIDVector->setValue(relIDPos, internalID_t{relOffset, table.getTableID()}); relIDVector->setNull(relIDPos, false); @@ -75,13 +75,13 @@ bool LocalRelTable::insert(Transaction*, TableInsertState& state) { } bool LocalRelTable::update(Transaction* transaction, TableUpdateState& state) { - KU_ASSERT(transaction->isDummy()); + RYU_ASSERT(transaction->isDummy()); const auto& updateState = state.cast(); std::vector rowIndicesToUpdate; for (auto& directedIndex : directedIndices) { const auto& nodeIDVector = updateState.getBoundNodeIDVector(directedIndex.direction); - KU_ASSERT(nodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeIDVector.state->getSelVector().getSelSize() == 1); auto nodePos = nodeIDVector.state->getSelVector()[0]; if (nodeIDVector.isNull(nodePos)) { return false; @@ -99,7 +99,7 @@ bool LocalRelTable::update(Transaction* transaction, TableUpdateState& state) { if (matchedRow == INVALID_ROW_IDX) { return false; } - KU_ASSERT(updateState.columnID != NBR_ID_COLUMN_ID); + RYU_ASSERT(updateState.columnID != NBR_ID_COLUMN_ID); localNodeGroup->update(transaction, matchedRow, rewriteLocalColumnID(RelDataDirection::FWD /* This is a dummy direction */, updateState.columnID), @@ -128,13 +128,13 @@ bool LocalRelTable::delete_(Transaction* transaction, TableDeleteState& state) { deleteState.dstNodeIDVector); } for (auto& [csrIndex, nodeIDVector] : directedIndicesAndNodeIDVectors) { - KU_ASSERT(nodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeIDVector.state->getSelVector().getSelSize() == 1); auto nodePos = nodeIDVector.state->getSelVector()[0]; if (nodeIDVector.isNull(nodePos)) { return false; } auto nodeOffset = nodeIDVector.readNodeOffset(nodePos); - KU_ASSERT(csrIndex.index.contains(nodeOffset)); + RYU_ASSERT(csrIndex.index.contains(nodeOffset)); rowIndicesToDeleteFrom.push_back(&csrIndex.index[nodeOffset]); } @@ -162,7 +162,7 @@ bool LocalRelTable::addColumn(TableAddColumnState& addColumnState) { bool LocalRelTable::checkIfNodeHasRels(ValueVector* srcNodeIDVector, RelDataDirection direction) const { - KU_ASSERT(srcNodeIDVector->state->isFlat()); + RYU_ASSERT(srcNodeIDVector->state->isFlat()); const auto nodeIDPos = srcNodeIDVector->state->getSelVector()[0]; const auto nodeOffset = srcNodeIDVector->getValue(nodeIDPos).offset; const auto& directedIndex = @@ -172,8 +172,8 @@ bool LocalRelTable::checkIfNodeHasRels(ValueVector* srcNodeIDVector, void LocalRelTable::initializeScan(TableScanState& state) { auto& relScanState = state.cast(); - KU_ASSERT(relScanState.source == TableScanSource::UNCOMMITTED); - KU_ASSERT(relScanState.localTableScanState); + RYU_ASSERT(relScanState.source == TableScanSource::UNCOMMITTED); + RYU_ASSERT(relScanState.localTableScanState); auto& localScanState = *relScanState.localTableScanState; localScanState.rowIndices.clear(); localScanState.nextRowToScan = 0; @@ -199,7 +199,7 @@ column_id_t LocalRelTable::rewriteLocalColumnID(RelDataDirection direction, colu bool LocalRelTable::scan(const Transaction* transaction, TableScanState& state) const { auto& relScanState = state.cast(); - KU_ASSERT(relScanState.localTableScanState); + RYU_ASSERT(relScanState.localTableScanState); auto& localScanState = *relScanState.localTableScanState; while (true) { if (relScanState.currBoundNodeIdx >= relScanState.cachedBoundNodeSelVector.getSelSize()) { @@ -213,10 +213,10 @@ bool LocalRelTable::scan(const Transaction* transaction, TableScanState& state) if (localScanState.rowIndices.empty() && localCSRIndex.contains(boundNodeOffset)) { localScanState.rowIndices = localCSRIndex.at(boundNodeOffset); localScanState.nextRowToScan = 0; - KU_ASSERT( + RYU_ASSERT( std::is_sorted(localScanState.rowIndices.begin(), localScanState.rowIndices.end())); } - KU_ASSERT(localScanState.rowIndices.size() >= localScanState.nextRowToScan); + RYU_ASSERT(localScanState.rowIndices.size() >= localScanState.nextRowToScan); const auto numToScan = std::min(localScanState.rowIndices.size() - localScanState.nextRowToScan, DEFAULT_VECTOR_CAPACITY); @@ -283,7 +283,7 @@ row_idx_t LocalRelTable::findMatchingRow(const Transaction* transaction, [[maybe_unused]] auto lookupRes = localNodeGroup->lookupMultiple(transaction, *scanState); const auto scannedRelIDVector = scanState->outputVectors[0]; - KU_ASSERT( + RYU_ASSERT( scannedRelIDVector->state->getSelVector().getSelSize() == currentRowsToCheck.size()); for (auto i = 0u; i < currentRowsToCheck.size(); i++) { if (scannedRelIDVector->getValue(i).offset == relOffset) { diff --git a/src/storage/local_storage/local_storage.cpp b/src/storage/local_storage/local_storage.cpp index 1e10f14a23..afc2333ad4 100644 --- a/src/storage/local_storage/local_storage.cpp +++ b/src/storage/local_storage/local_storage.cpp @@ -31,7 +31,7 @@ LocalTable* LocalStorage::getOrCreateLocalTable(Table& table) { tables[tableID] = std::make_unique(tableEntry, table, mm); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return tables.at(tableID).get(); diff --git a/src/storage/overflow_file.cpp b/src/storage/overflow_file.cpp index 846cc99e0c..2377593b9b 100644 --- a/src/storage/overflow_file.cpp +++ b/src/storage/overflow_file.cpp @@ -164,7 +164,7 @@ void OverflowFileHandle::reclaimStorage(PageAllocator& pageAllocator) { // reclaimStorage() is only called after the hash index is checkpointed // so the page write cache should always be cleared - KU_ASSERT(!pageWriteCache.contains(pageIdx)); + RYU_ASSERT(!pageWriteCache.contains(pageIdx)); overflowFile.readFromDisk(TransactionType::CHECKPOINT, pageIdx, [&pageIdx](auto* frame) { pageIdx = *reinterpret_cast(frame + END_OF_PAGE); }); @@ -184,7 +184,7 @@ OverflowFile::OverflowFile(FileHandle* fileHandle, MemoryManager& memoryManager, ShadowFile* shadowFile, page_idx_t headerPageIdx) : fileHandle{fileHandle}, shadowFile{shadowFile}, memoryManager{memoryManager}, headerChanged{false}, headerPageIdx{headerPageIdx} { - KU_ASSERT(shadowFile); + RYU_ASSERT(shadowFile); if (headerPageIdx != INVALID_PAGE_IDX) { readFromDisk(TransactionType::READ_ONLY, headerPageIdx, [&](auto* frame) { memcpy(&header, frame, sizeof(header)); }); @@ -213,7 +213,7 @@ common::page_idx_t OverflowFile::getNewPageIdx(PageAllocator* pageAllocator) { void OverflowFile::readFromDisk(TransactionType trxType, page_idx_t pageIdx, const std::function& func) const { - KU_ASSERT(shadowFile); + RYU_ASSERT(shadowFile); auto [fileHandleToPin, pageIdxToPin] = ShadowUtils::getFileHandleAndPhysicalPageIdxToPin( *fileHandle, pageIdx, *shadowFile, trxType); fileHandleToPin->optimisticReadPage(pageIdxToPin, func); @@ -221,18 +221,18 @@ void OverflowFile::readFromDisk(TransactionType trxType, page_idx_t pageIdx, void OverflowFile::writePageToDisk(page_idx_t pageIdx, uint8_t* data, bool newPage) const { if (newPage) { - KU_ASSERT(fileHandle); - KU_ASSERT(!fileHandle->isInMemoryMode()); + RYU_ASSERT(fileHandle); + RYU_ASSERT(!fileHandle->isInMemoryMode()); fileHandle->writePageToFile(data, pageIdx); } else { - KU_ASSERT(shadowFile); + RYU_ASSERT(shadowFile); ShadowUtils::updatePage(*fileHandle, pageIdx, true /* overwriting entire page*/, *shadowFile, [&](auto* frame) { memcpy(frame, data, RYU_PAGE_SIZE); }); } } void OverflowFile::checkpoint(PageAllocator& pageAllocator) { - KU_ASSERT(fileHandle); + RYU_ASSERT(fileHandle); if (headerPageIdx == INVALID_PAGE_IDX) { // Reserve a page for the header this->headerPageIdx = getNewPageIdx(&pageAllocator); @@ -258,7 +258,7 @@ void OverflowFile::checkpointInMemory() { } void OverflowFile::rollbackInMemory() { - KU_ASSERT(getFileHandle()->getNumPages() <= INVALID_PAGE_IDX); + RYU_ASSERT(getFileHandle()->getNumPages() <= INVALID_PAGE_IDX); if (getFileHandle()->getNumPages() > headerPageIdx) { readFromDisk(TransactionType::READ_ONLY, headerPageIdx, [&](auto* frame) { memcpy(&header, frame, sizeof(header)); }); diff --git a/src/storage/page_manager.cpp b/src/storage/page_manager.cpp index d66ed16675..cd49483516 100644 --- a/src/storage/page_manager.cpp +++ b/src/storage/page_manager.cpp @@ -17,7 +17,7 @@ PageRange PageManager::allocatePageRange(common::page_idx_t numPages) { } } auto startPageIdx = fileHandle->addNewPages(numPages); - KU_ASSERT(fileHandle->getNumPages() >= startPageIdx + numPages); + RYU_ASSERT(fileHandle->getNumPages() >= startPageIdx + numPages); return PageRange(startPageIdx, numPages); } diff --git a/src/storage/predicate/column_predicate.cpp b/src/storage/predicate/column_predicate.cpp index 4d41f47991..c78d954db9 100644 --- a/src/storage/predicate/column_predicate.cpp +++ b/src/storage/predicate/column_predicate.cpp @@ -39,7 +39,7 @@ static bool isCastedColumnRef(const Expression& expr) { if (expr.expressionType == ExpressionType::FUNCTION) { const auto& funcExpr = expr.constCast(); if (funcExpr.getFunction().name.starts_with("CAST")) { - KU_ASSERT(funcExpr.getNumChildren() > 0); + RYU_ASSERT(funcExpr.getNumChildren() > 0); return isColumnRef(funcExpr.getChild(0)->expressionType); } } diff --git a/src/storage/predicate/constant_predicate.cpp b/src/storage/predicate/constant_predicate.cpp index 9b6792050a..98fa96ae36 100644 --- a/src/storage/predicate/constant_predicate.cpp +++ b/src/storage/predicate/constant_predicate.cpp @@ -59,7 +59,7 @@ ZoneMapCheckResult checkZoneMapSwitch(const MergedColumnChunkStats& mergedStats, } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return ZoneMapCheckResult::ALWAYS_SCAN; diff --git a/src/storage/shadow_file.cpp b/src/storage/shadow_file.cpp index 1cf9c9bc17..d65a0e72ab 100644 --- a/src/storage/shadow_file.cpp +++ b/src/storage/shadow_file.cpp @@ -36,7 +36,7 @@ ShadowPageRecord ShadowPageRecord::deserialize(Deserializer& deserializer) { ShadowFile::ShadowFile(BufferManager& bm, VirtualFileSystem* vfs, const std::string& databasePath) : bm{bm}, shadowFilePath{StorageUtils::getShadowFilePath(databasePath)}, vfs{vfs}, shadowingFH{nullptr} { - KU_ASSERT(vfs); + RYU_ASSERT(vfs); } void ShadowFile::clearShadowPage(file_idx_t originalFile, page_idx_t originalPage) { @@ -59,7 +59,7 @@ page_idx_t ShadowFile::getOrCreateShadowPage(file_idx_t originalFile, page_idx_t } page_idx_t ShadowFile::getShadowPage(file_idx_t originalFile, page_idx_t originalPage) const { - KU_ASSERT(hasShadowPage(originalFile, originalPage)); + RYU_ASSERT(hasShadowPage(originalFile, originalPage)); return shadowPagesMap.at(originalFile).at(originalPage); } @@ -67,7 +67,7 @@ void ShadowFile::applyShadowPages(ClientContext& context) const { const auto pageBuffer = std::make_unique(RYU_PAGE_SIZE); page_idx_t shadowPageIdx = 1; // Skip header page. auto dataFileInfo = StorageManager::Get(context)->getDataFH()->getFileInfo(); - KU_ASSERT(shadowingFH); + RYU_ASSERT(shadowingFH); for (const auto& record : shadowPageRecords) { shadowingFH->readPageFromDisk(pageBuffer.get(), shadowPageIdx++); dataFileInfo->writeFile(pageBuffer.get(), RYU_PAGE_SIZE, @@ -145,7 +145,7 @@ void ShadowFile::flushAll(main::ClientContext& context) const { header.databaseID = StorageManager::Get(context)->getOrInitDatabaseID(context); const auto headerBuffer = std::make_unique(RYU_PAGE_SIZE); memcpy(headerBuffer.get(), &header, sizeof(ShadowFileHeader)); - KU_ASSERT(shadowingFH && !shadowingFH->isInMemoryMode()); + RYU_ASSERT(shadowingFH && !shadowingFH->isInMemoryMode()); shadowingFH->writePageToFile(headerBuffer.get(), 0); // Flush shadow pages to file. shadowingFH->flushAllDirtyPagesInFrames(); @@ -153,7 +153,7 @@ void ShadowFile::flushAll(main::ClientContext& context) const { const auto writer = std::make_shared(*shadowingFH->getFileInfo()); writer->setFileOffset(shadowingFH->getNumPages() * RYU_PAGE_SIZE); Serializer ser(writer); - KU_ASSERT(shadowPageRecords.size() + 1 == shadowingFH->getNumPages()); + RYU_ASSERT(shadowPageRecords.size() + 1 == shadowingFH->getNumPages()); ser.serializeVector(shadowPageRecords); writer->flush(); // Sync the file to disk. @@ -161,7 +161,7 @@ void ShadowFile::flushAll(main::ClientContext& context) const { } void ShadowFile::clear(BufferManager& bm) { - KU_ASSERT(shadowingFH); + RYU_ASSERT(shadowingFH); // TODO(Guodong): We should remove shadow file here. This requires changes: // 1. We need to make shadow file not going through BM. // 2. We need to remove fileHandles held in BM, so that BM only keeps FH for the data file. diff --git a/src/storage/shadow_utils.cpp b/src/storage/shadow_utils.cpp index 9652b4906f..529e01c77e 100644 --- a/src/storage/shadow_utils.cpp +++ b/src/storage/shadow_utils.cpp @@ -11,7 +11,7 @@ namespace storage { ShadowPageAndFrame ShadowUtils::createShadowVersionIfNecessaryAndPinPage(page_idx_t originalPage, bool skipReadingOriginalPage, FileHandle& fileHandle, ShadowFile& shadowFile) { - KU_ASSERT(!fileHandle.isInMemoryMode()); + RYU_ASSERT(!fileHandle.isInMemoryMode()); const auto hasShadowPage = shadowFile.hasShadowPage(fileHandle.getFileIndex(), originalPage); auto shadowPage = shadowFile.getOrCreateShadowPage(fileHandle.getFileIndex(), originalPage); uint8_t* shadowFrame = nullptr; @@ -50,15 +50,15 @@ std::pair ShadowUtils::getFileHandleAndPhysicalPageIdxT void unpinShadowPage(page_idx_t originalPageIdx, page_idx_t shadowPageIdx, const ShadowFile& shadowFile) { - KU_ASSERT(originalPageIdx != INVALID_PAGE_IDX && shadowPageIdx != INVALID_PAGE_IDX); - KU_UNUSED(originalPageIdx); + RYU_ASSERT(originalPageIdx != INVALID_PAGE_IDX && shadowPageIdx != INVALID_PAGE_IDX); + RYU_UNUSED(originalPageIdx); shadowFile.getShadowingFH().unpinPage(shadowPageIdx); } void ShadowUtils::updatePage(FileHandle& fileHandle, page_idx_t originalPageIdx, bool skipReadingOriginalPage, ShadowFile& shadowFile, const std::function& updateOp) { - KU_ASSERT(!fileHandle.isInMemoryMode()); + RYU_ASSERT(!fileHandle.isInMemoryMode()); const auto shadowPageIdxAndFrame = createShadowVersionIfNecessaryAndPinPage(originalPageIdx, skipReadingOriginalPage, fileHandle, shadowFile); try { @@ -74,8 +74,8 @@ void ShadowUtils::updatePage(FileHandle& fileHandle, page_idx_t originalPageIdx, void ShadowUtils::readShadowVersionOfPage(const FileHandle& fileHandle, page_idx_t originalPageIdx, const ShadowFile& shadowFile, const std::function& readOp) { - KU_ASSERT(!fileHandle.isInMemoryMode()); - KU_ASSERT(shadowFile.hasShadowPage(fileHandle.getFileIndex(), originalPageIdx)); + RYU_ASSERT(!fileHandle.isInMemoryMode()); + RYU_ASSERT(shadowFile.hasShadowPage(fileHandle.getFileIndex(), originalPageIdx)); const page_idx_t shadowPageIdx = shadowFile.getShadowPage(fileHandle.getFileIndex(), originalPageIdx); const auto frame = diff --git a/src/storage/stats/column_stats.cpp b/src/storage/stats/column_stats.cpp index 948a74ab46..f79514df17 100644 --- a/src/storage/stats/column_stats.cpp +++ b/src/storage/stats/column_stats.cpp @@ -19,7 +19,7 @@ void ColumnStats::update(const common::ValueVector* vector) { hashes->state = vector->state; function::VectorHashFunction::computeHash(*vector, vector->state->getSelVector(), *hashes, hashes->state->getSelVector()); - KU_ASSERT(hashes->hasNoNullsGuarantee()); + RYU_ASSERT(hashes->hasNoNullsGuarantee()); for (auto i = 0u; i < hashes->state->getSelVector().getSelSize(); i++) { hll->insertElement(hashes->getValue(i)); } diff --git a/src/storage/stats/table_stats.cpp b/src/storage/stats/table_stats.cpp index 8c35e3cad2..78175ca27b 100644 --- a/src/storage/stats/table_stats.cpp +++ b/src/storage/stats/table_stats.cpp @@ -29,17 +29,17 @@ void TableStats::update(const std::vector& vectors, size_t void TableStats::update(const std::vector& columnIDs, const std::vector& vectors, size_t numColumns) { - KU_ASSERT(columnIDs.size() == vectors.size()); + RYU_ASSERT(columnIDs.size() == vectors.size()); size_t numColumnsToUpdate = std::min(numColumns, vectors.size()); for (auto i = 0u; i < numColumnsToUpdate; ++i) { auto columnID = columnIDs[i]; - KU_ASSERT(columnID < columnStats.size()); + RYU_ASSERT(columnID < columnStats.size()); columnStats[columnID].update(vectors[i]); } const auto numValues = vectors[0]->state->getSelVector().getSelSize(); for (auto i = 1u; i < numColumnsToUpdate; ++i) { - KU_ASSERT(vectors[i]->state->getSelVector().getSelSize() == numValues); + RYU_ASSERT(vectors[i]->state->getSelVector().getSelSize() == numValues); } incrementCardinality(numValues); } diff --git a/src/storage/storage_manager.cpp b/src/storage/storage_manager.cpp index 3d237ef873..5d6b303d68 100644 --- a/src/storage/storage_manager.cpp +++ b/src/storage/storage_manager.cpp @@ -66,7 +66,7 @@ void StorageManager::initDataFileHandle(VirtualFileSystem* vfs, main::ClientCont Table* StorageManager::getTable(table_id_t tableID) { std::lock_guard lck{mtx}; - KU_ASSERT(tables.contains(tableID)); + RYU_ASSERT(tables.contains(tableID)); return tables.at(tableID).get(); } @@ -104,18 +104,18 @@ void StorageManager::createTable(TableCatalogEntry* entry) { createRelTableGroup(entry->ptrCast()); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } WAL& StorageManager::getWAL() const { - KU_ASSERT(wal); + RYU_ASSERT(wal); return *wal; } ShadowFile& StorageManager::getShadowFile() const { - KU_ASSERT(shadowFile); + RYU_ASSERT(shadowFile); return *shadowFile; } @@ -192,7 +192,7 @@ void StorageManager::rollbackCheckpoint(const Catalog& catalog) { std::lock_guard lck{mtx}; const auto nodeTableEntries = catalog.getNodeTableEntries(&DUMMY_CHECKPOINT_TRANSACTION); for (const auto tableEntry : nodeTableEntries) { - KU_ASSERT(tables.contains(tableEntry->getTableID())); + RYU_ASSERT(tables.contains(tableEntry->getTableID())); tables.at(tableEntry->getTableID())->rollbackCheckpoint(); } dataFH->getPageManager()->rollbackCheckpoint(); @@ -219,7 +219,7 @@ void StorageManager::serialize(const Catalog& catalog, Serializer& ser) { ser.writeDebuggingInfo("num_node_tables"); ser.write(nodeTableEntries.size()); for (const auto tableEntry : nodeTableEntries) { - KU_ASSERT(tables.contains(tableEntry->getTableID())); + RYU_ASSERT(tables.contains(tableEntry->getTableID())); ser.writeDebuggingInfo("table_id"); ser.write(tableEntry->getTableID()); tables.at(tableEntry->getTableID())->serialize(ser); @@ -233,7 +233,7 @@ void StorageManager::serialize(const Catalog& catalog, Serializer& ser) { ser.writeDebuggingInfo("num_inner_rel_tables"); ser.write(relGroupEntry.getNumRelTables()); for (auto& info : relGroupEntry.getRelEntryInfos()) { - KU_ASSERT(tables.contains(info.oid)); + RYU_ASSERT(tables.contains(info.oid)); info.serialize(ser); tables.at(info.oid)->serialize(ser); } @@ -254,7 +254,7 @@ void StorageManager::deserialize(main::ClientContext* context, const Catalog* ca throw RuntimeException( stringFormat("Load table failed: table {} doesn't exist in catalog.", tableID)); } - KU_ASSERT(!tables.contains(tableID)); + RYU_ASSERT(!tables.contains(tableID)); auto tableEntry = catalog->getTableCatalogEntry(&DUMMY_TRANSACTION, tableID) ->ptrCast(); tables[tableID] = std::make_unique(this, tableEntry, &memoryManager); @@ -278,7 +278,7 @@ void StorageManager::deserialize(main::ClientContext* context, const Catalog* ca ->ptrCast(); for (auto k = 0u; k < numInnerRelTables; k++) { RelTableCatalogInfo info = RelTableCatalogInfo::deserialize(deSer); - KU_ASSERT(!tables.contains(info.oid)); + RYU_ASSERT(!tables.contains(info.oid)); tables[info.oid] = std::make_unique(relGroupEntry, info.nodePair.srcTableID, info.nodePair.dstTableID, this, &memoryManager); tables.at(info.oid)->deserialize(context, this, deSer); @@ -294,7 +294,7 @@ const storage::DatabaseHeader* StorageManager::getOrInitDatabaseHeader( const main::ClientContext& clientContext) { if (databaseHeader == nullptr) { // We should only create the database header if a persistent one doesn't exist - KU_ASSERT(std::nullopt == DatabaseHeader::readDatabaseHeader(*dataFH->getFileInfo())); + RYU_ASSERT(std::nullopt == DatabaseHeader::readDatabaseHeader(*dataFH->getFileInfo())); databaseHeader = std::make_unique( DatabaseHeader::createInitialHeader(RandomEngine::Get(clientContext))); } @@ -302,7 +302,7 @@ const storage::DatabaseHeader* StorageManager::getOrInitDatabaseHeader( } void StorageManager::setDatabaseHeader(std::unique_ptr header) { - KU_ASSERT(!databaseHeader || header->databaseID.value == databaseHeader->databaseID.value); + RYU_ASSERT(!databaseHeader || header->databaseID.value == databaseHeader->databaseID.value); databaseHeader = std::move(header); } diff --git a/src/storage/table/chunked_node_group.cpp b/src/storage/table/chunked_node_group.cpp index 1aecf332dd..68665f910a 100644 --- a/src/storage/table/chunked_node_group.cpp +++ b/src/storage/table/chunked_node_group.cpp @@ -37,13 +37,13 @@ static void handleAppendException(std::vector>& chunks, u ChunkedNodeGroup::ChunkedNodeGroup(std::vector> chunks, row_idx_t startRowIdx, NodeGroupDataFormat format) : format{format}, startRowIdx{startRowIdx}, chunks{std::move(chunks)} { - KU_ASSERT(!this->chunks.empty()); + RYU_ASSERT(!this->chunks.empty()); residencyState = this->chunks[0]->getResidencyState(); numRows = this->chunks[0]->getNumValues(); capacity = numRows; for (auto columnID = 1u; columnID < this->chunks.size(); columnID++) { - KU_ASSERT(this->chunks[columnID]->getNumValues() == numRows); - KU_ASSERT(this->chunks[columnID]->getResidencyState() == residencyState); + RYU_ASSERT(this->chunks[columnID]->getNumValues() == numRows); + RYU_ASSERT(this->chunks[columnID]->getResidencyState() == residencyState); } } @@ -54,7 +54,7 @@ ChunkedNodeGroup::ChunkedNodeGroup(ChunkedNodeGroup& base, chunks.resize(selectedColumns.size()); for (auto i = 0u; i < selectedColumns.size(); i++) { auto columnID = selectedColumns[i]; - KU_ASSERT(columnID < base.getNumColumns()); + RYU_ASSERT(columnID < base.getNumColumns()); chunks[i] = base.moveColumnChunk(columnID); } } @@ -66,7 +66,7 @@ ChunkedNodeGroup::ChunkedNodeGroup(InMemChunkedNodeGroup& base, chunks.resize(selectedColumns.size()); for (auto i = 0u; i < selectedColumns.size(); i++) { auto columnID = selectedColumns[i]; - KU_ASSERT(columnID < base.getNumColumns()); + RYU_ASSERT(columnID < base.getNumColumns()); chunks[i] = std::make_unique(true /*enableCompression*/, base.moveColumnChunk(columnID)); } @@ -90,17 +90,17 @@ ChunkedNodeGroup::ChunkedNodeGroup(MemoryManager& mm, ChunkedNodeGroup& base, capacity{base.capacity}, numRows{base.numRows.load()}, versionInfo(std::move(base.versionInfo)) { bool enableCompression = false; - KU_ASSERT(!baseColumnIDs.empty()); + RYU_ASSERT(!baseColumnIDs.empty()); chunks.resize(columnTypes.size()); - KU_ASSERT(base.getNumColumns() == baseColumnIDs.size()); + RYU_ASSERT(base.getNumColumns() == baseColumnIDs.size()); for (column_id_t i = 0; i < baseColumnIDs.size(); ++i) { auto baseColumnID = baseColumnIDs[i]; - KU_ASSERT(baseColumnID < chunks.size()); + RYU_ASSERT(baseColumnID < chunks.size()); chunks[baseColumnID] = base.moveColumnChunk(i); enableCompression = chunks[baseColumnID]->isCompressionEnabled(); - KU_ASSERT(chunks[baseColumnID]->getDataType().getPhysicalType() == + RYU_ASSERT(chunks[baseColumnID]->getDataType().getPhysicalType() == columnTypes[baseColumnID].getPhysicalType()); } @@ -113,12 +113,12 @@ ChunkedNodeGroup::ChunkedNodeGroup(MemoryManager& mm, ChunkedNodeGroup& base, } void ChunkedNodeGroup::resetNumRowsFromChunks() { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); - KU_ASSERT(!chunks.empty()); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(!chunks.empty()); numRows = getColumnChunk(0).getNumValues(); capacity = numRows; for (auto i = 1u; i < getNumColumns(); i++) { - KU_ASSERT(numRows == getColumnChunk(i).getNumValues()); + RYU_ASSERT(numRows == getColumnChunk(i).getNumValues()); } } @@ -132,7 +132,7 @@ void ChunkedNodeGroup::resetVersionAndUpdateInfo() { } void ChunkedNodeGroup::truncate(const offset_t numRows_) { - KU_ASSERT(numRows >= numRows_); + RYU_ASSERT(numRows >= numRows_); for (const auto& chunk : chunks) { chunk->truncate(numRows_); } @@ -149,8 +149,8 @@ void InMemChunkedNodeGroup::setNumRows(const offset_t numRows_) { uint64_t ChunkedNodeGroup::append(const Transaction* transaction, const std::vector& columnVectors, row_idx_t startRowInVectors, uint64_t numValuesToAppend) { - KU_ASSERT(residencyState != ResidencyState::ON_DISK); - KU_ASSERT(columnVectors.size() == chunks.size()); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(columnVectors.size() == chunks.size()); const auto numRowsToAppendInChunk = std::min(numValuesToAppend, capacity - numRows); try { for (auto i = 0u; i < columnVectors.size(); i++) { @@ -174,8 +174,8 @@ uint64_t ChunkedNodeGroup::append(const Transaction* transaction, offset_t ChunkedNodeGroup::append(const Transaction* transaction, const std::vector& columnIDs, const ChunkedNodeGroup& other, offset_t offsetInOtherNodeGroup, offset_t numRowsToAppend) { - KU_ASSERT(residencyState == ResidencyState::IN_MEMORY); - KU_ASSERT(other.chunks.size() == chunks.size()); + RYU_ASSERT(residencyState == ResidencyState::IN_MEMORY); + RYU_ASSERT(other.chunks.size() == chunks.size()); std::vector chunksToAppend(other.chunks.size()); for (auto i = 0u; i < chunks.size(); i++) { chunksToAppend[i] = other.chunks[i].get(); @@ -186,8 +186,8 @@ offset_t ChunkedNodeGroup::append(const Transaction* transaction, offset_t ChunkedNodeGroup::append(const Transaction* transaction, const std::vector& columnIDs, const InMemChunkedNodeGroup& other, offset_t offsetInOtherNodeGroup, offset_t numRowsToAppend) { - KU_ASSERT(residencyState == ResidencyState::IN_MEMORY); - KU_ASSERT(other.chunks.size() == chunks.size()); + RYU_ASSERT(residencyState == ResidencyState::IN_MEMORY); + RYU_ASSERT(other.chunks.size() == chunks.size()); std::vector chunksToAppend(other.chunks.size()); for (auto i = 0u; i < chunks.size(); i++) { chunksToAppend[i] = other.chunks[i].get(); @@ -198,13 +198,13 @@ offset_t ChunkedNodeGroup::append(const Transaction* transaction, offset_t ChunkedNodeGroup::append(const Transaction* transaction, const std::vector& columnIDs, std::span other, offset_t offsetInOtherNodeGroup, offset_t numRowsToAppend) { - KU_ASSERT(residencyState == ResidencyState::IN_MEMORY); - KU_ASSERT(other.size() == columnIDs.size()); + RYU_ASSERT(residencyState == ResidencyState::IN_MEMORY); + RYU_ASSERT(other.size() == columnIDs.size()); const auto numToAppendInChunkedGroup = std::min(numRowsToAppend, capacity - numRows); try { for (auto i = 0u; i < columnIDs.size(); i++) { auto columnID = columnIDs[i]; - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); chunks[columnID]->append(other[i], offsetInOtherNodeGroup, numToAppendInChunkedGroup); } } catch ([[maybe_unused]] std::exception& e) { @@ -223,13 +223,13 @@ offset_t ChunkedNodeGroup::append(const Transaction* transaction, offset_t ChunkedNodeGroup::append(const Transaction* transaction, const std::vector& columnIDs, std::span other, offset_t offsetInOtherNodeGroup, offset_t numRowsToAppend) { - KU_ASSERT(residencyState == ResidencyState::IN_MEMORY); - KU_ASSERT(other.size() == columnIDs.size()); + RYU_ASSERT(residencyState == ResidencyState::IN_MEMORY); + RYU_ASSERT(other.size() == columnIDs.size()); const auto numToAppendInChunkedGroup = std::min(numRowsToAppend, capacity - numRows); try { for (auto i = 0u; i < columnIDs.size(); i++) { auto columnID = columnIDs[i]; - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); chunks[columnID]->append(other[i], offsetInOtherNodeGroup, numToAppendInChunkedGroup); } } catch ([[maybe_unused]] std::exception& e) { @@ -246,7 +246,7 @@ offset_t ChunkedNodeGroup::append(const Transaction* transaction, } void InMemChunkedNodeGroup::write(const InMemChunkedNodeGroup& data, column_id_t offsetColumnID) { - KU_ASSERT(data.chunks.size() == chunks.size() + 1); + RYU_ASSERT(data.chunks.size() == chunks.size() + 1); auto& offsetChunk = data.chunks[offsetColumnID]; column_id_t columnID = 0, chunkIdx = 0; for (auto i = 0u; i < data.chunks.size(); i++) { @@ -254,14 +254,14 @@ void InMemChunkedNodeGroup::write(const InMemChunkedNodeGroup& data, column_id_t columnID++; continue; } - KU_ASSERT(columnID < data.chunks.size()); + RYU_ASSERT(columnID < data.chunks.size()); writeToColumnChunk(chunkIdx, columnID, data.chunks, *offsetChunk); chunkIdx++; columnID++; } numRows = chunks[0]->getNumValues(); for (auto i = 1u; i < chunks.size(); i++) { - KU_ASSERT(numRows == chunks[i]->getNumValues()); + RYU_ASSERT(numRows == chunks[i]->getNumValues()); } } @@ -274,7 +274,7 @@ static ZoneMapCheckResult getZoneMapResult(const TableScanState& scanState, continue; } - KU_ASSERT(i < scanState.columnPredicateSets.size()); + RYU_ASSERT(i < scanState.columnPredicateSets.size()); if (chunks[columnID]->hasUpdates()) { // With updates, we need to merge with update data for the correct stats, which can // be slow if there are lots of updates. We defer this for now. @@ -293,7 +293,7 @@ static ZoneMapCheckResult getZoneMapResult(const TableScanState& scanState, void ChunkedNodeGroup::scan(const Transaction* transaction, const TableScanState& scanState, const NodeGroupScanState& nodeGroupScanState, offset_t rowIdxInGroup, length_t numRowsToScan) const { - KU_ASSERT(rowIdxInGroup + numRowsToScan <= numRows); + RYU_ASSERT(rowIdxInGroup + numRowsToScan <= numRows); auto& anchorSelVector = scanState.outState->getSelVectorUnsafe(); if (getZoneMapResult(scanState, chunks) == ZoneMapCheckResult::SKIP_SCAN) { anchorSelVector.setToFiltered(0); @@ -321,7 +321,7 @@ void ChunkedNodeGroup::scan(const Transaction* transaction, const TableScanState } continue; } - KU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(columnID < chunks.size()); chunks[columnID]->scan(transaction, nodeGroupScanState.chunkStates[i], *scanState.outputVectors[i], rowIdxInGroup, numRowsToScan); } @@ -357,7 +357,7 @@ row_idx_t ChunkedNodeGroup::getNumUpdatedRows(const Transaction* transaction, bool ChunkedNodeGroup::lookup(const Transaction* transaction, const TableScanState& state, const NodeGroupScanState& nodeGroupScanState, offset_t rowIdxInChunk, sel_t posInOutput) const { - KU_ASSERT(rowIdxInChunk + 1 <= numRows); + RYU_ASSERT(rowIdxInChunk + 1 <= numRows); const bool hasValuesToRead = versionInfo ? versionInfo->isSelected(transaction->getStartTS(), transaction->getID(), rowIdxInChunk) : true; @@ -376,8 +376,8 @@ bool ChunkedNodeGroup::lookup(const Transaction* transaction, const TableScanSta rowIdxInChunk + startRowIdx); continue; } - KU_ASSERT(columnID < chunks.size()); - KU_ASSERT(i < nodeGroupScanState.chunkStates.size()); + RYU_ASSERT(columnID < chunks.size()); + RYU_ASSERT(i < nodeGroupScanState.chunkStates.size()); chunks[columnID]->lookup(transaction, nodeGroupScanState.chunkStates[i], rowIdxInChunk, *state.outputVectors[i], state.outputVectors[i]->state->getSelVector()[posInOutput]); } @@ -405,7 +405,7 @@ void ChunkedNodeGroup::addColumn(MemoryManager& mm, const TableAddColumnState& a chunks.back()->populateWithDefaultVal(addColumnState.defaultEvaluator, numExistingRows, newColumnStats); if (residencyState == ResidencyState::ON_DISK) { - KU_ASSERT(pageAllocator); + RYU_ASSERT(pageAllocator); chunks.back()->flush(*pageAllocator); } } @@ -472,7 +472,7 @@ std::unique_ptr InMemChunkedNodeGroup::flush(Transaction* tran auto flushedChunkedGroup = std::make_unique(std::move(flushedChunks), 0 /*startRowIdx*/); flushedChunkedGroup->versionInfo = std::make_unique(); - KU_ASSERT(flushedChunkedGroup->getNumRows() == numRows); + RYU_ASSERT(flushedChunkedGroup->getNumRows() == numRows); flushedChunkedGroup->versionInfo->append(transaction->getID(), 0, numRows); return flushedChunkedGroup; } @@ -550,7 +550,7 @@ void ChunkedNodeGroup::reclaimStorage(PageAllocator& pageAllocator) const { } void ChunkedNodeGroup::serialize(Serializer& serializer) const { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); serializer.writeDebuggingInfo("chunks"); serializer.serializeVectorOfPtrs(chunks); serializer.writeDebuggingInfo("startRowIdx"); @@ -599,9 +599,9 @@ InMemChunkedNodeGroup::InMemChunkedNodeGroup(std::vectorgetNumValues()}, capacity{numRows}, chunks{std::move(chunks)}, dataInUse{true} { - KU_ASSERT(!this->chunks.empty()); + RYU_ASSERT(!this->chunks.empty()); for (auto columnID = 1u; columnID < this->chunks.size(); columnID++) { - KU_ASSERT(this->chunks[columnID]->getNumValues() == numRows); + RYU_ASSERT(this->chunks[columnID]->getNumValues() == numRows); } } @@ -667,7 +667,7 @@ void InMemChunkedNodeGroup::resizeChunks(const uint64_t newSize) { uint64_t InMemChunkedNodeGroup::append(const std::vector& columnVectors, row_idx_t startRowInVectors, uint64_t numValuesToAppend) { - KU_ASSERT(columnVectors.size() == chunks.size()); + RYU_ASSERT(columnVectors.size() == chunks.size()); const auto numRowsToAppendInChunk = std::min(numValuesToAppend, capacity - numRows); try { for (auto i = 0u; i < columnVectors.size(); i++) { @@ -684,7 +684,7 @@ uint64_t InMemChunkedNodeGroup::append(const std::vector& columnVe offset_t InMemChunkedNodeGroup::append(const InMemChunkedNodeGroup& other, offset_t offsetInOtherNodeGroup, offset_t numRowsToAppend) { - KU_ASSERT(other.chunks.size() == chunks.size()); + RYU_ASSERT(other.chunks.size() == chunks.size()); const auto numToAppendInChunkedGroup = std::min(numRowsToAppend, capacity - numRows); try { for (auto i = 0u; i < other.getNumColumns(); i++) { @@ -700,9 +700,9 @@ offset_t InMemChunkedNodeGroup::append(const InMemChunkedNodeGroup& other, void InMemChunkedNodeGroup::merge(InMemChunkedNodeGroup& base, const std::vector& columnsToMergeInto) { - KU_ASSERT(base.getNumColumns() == columnsToMergeInto.size()); + RYU_ASSERT(base.getNumColumns() == columnsToMergeInto.size()); for (idx_t i = 0; i < base.getNumColumns(); ++i) { - KU_ASSERT(columnsToMergeInto[i] < chunks.size()); + RYU_ASSERT(columnsToMergeInto[i] < chunks.size()); chunks[columnsToMergeInto[i]] = base.moveColumnChunk(i); } } @@ -714,7 +714,7 @@ InMemChunkedNodeGroup::InMemChunkedNodeGroup(InMemChunkedNodeGroup& base, chunks.resize(selectedColumns.size()); for (auto i = 0u; i < selectedColumns.size(); i++) { auto columnID = selectedColumns[i]; - KU_ASSERT(columnID < base.getNumColumns()); + RYU_ASSERT(columnID < base.getNumColumns()); chunks[i] = base.moveColumnChunk(columnID); } } diff --git a/src/storage/table/column.cpp b/src/storage/table/column.cpp index 7ea55be85e..a02fc5198c 100644 --- a/src/storage/table/column.cpp +++ b/src/storage/table/column.cpp @@ -35,9 +35,9 @@ struct ReadInternalIDValuesToVector { ReadInternalIDValuesToVector() : compressedReader{LogicalType(LogicalTypeID::INTERNAL_ID)} {} void operator()(const uint8_t* frame, PageCursor& pageCursor, ValueVector* resultVector, uint32_t posInVector, uint32_t numValuesToRead, const CompressionMetadata& metadata) { - KU_ASSERT(resultVector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); + RYU_ASSERT(resultVector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); - KU_ASSERT(numValuesToRead <= DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(numValuesToRead <= DEFAULT_VECTOR_CAPACITY); offset_t offsetBuffer[DEFAULT_VECTOR_CAPACITY]; compressedReader(frame, pageCursor, reinterpret_cast(offsetBuffer), 0, @@ -60,7 +60,7 @@ struct WriteInternalIDValuesToPage { } void operator()(uint8_t* frame, uint16_t posInFrame, ValueVector* vector, uint32_t offsetInVector, offset_t numValues, const CompressionMetadata& metadata) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); compressedWriter(frame, posInFrame, reinterpret_cast( &vector->getValue(offsetInVector).offset), @@ -180,7 +180,7 @@ std::unique_ptr Column::flushNonNestedChunkData(const ColumnChu ColumnChunkMetadata Column::flushData(const ColumnChunkData& chunkData, PageAllocator& pageAllocator) { - KU_ASSERT(chunkData.sanityCheck()); + RYU_ASSERT(chunkData.sanityCheck()); const auto preScanMetadata = chunkData.getMetadataToFlush(); auto allocatedBlock = pageAllocator.allocatePageRange(preScanMetadata.getNumPages()); return chunkData.flushBuffer(pageAllocator, allocatedBlock, preScanMetadata); @@ -195,8 +195,8 @@ void Column::scan(const ChunkState& state, offset_t startOffsetInChunk, offset_t RUNTIME_CHECK(if (resultVector->state) { sel_t prevValue = 0; resultVector->state->getSelVector().forEach([&](auto i) { - KU_ASSERT(prevValue <= i); - KU_ASSERT(i < length); + RYU_ASSERT(prevValue <= i); + RYU_ASSERT(i < length); prevValue = i; }); }); @@ -213,9 +213,9 @@ void Column::scanSegment(const SegmentState& state, offset_t startOffsetInSegmen if (numValuesToScan == 0) { return; } - KU_ASSERT(startOffsetInSegment + numValuesToScan <= state.metadata.numValues); + RYU_ASSERT(startOffsetInSegment + numValuesToScan <= state.metadata.numValues); if (nullColumn) { - KU_ASSERT(state.nullState); + RYU_ASSERT(state.nullState); nullColumn->scanSegment(*state.nullState, startOffsetInSegment, numValuesToScan, resultVector, offsetInVector); } @@ -255,7 +255,7 @@ void Column::scanSegment(const SegmentState& state, ColumnChunkData* outputChunk if (numValues == 0) { return; } - KU_ASSERT(offsetInSegment + numValues <= state.metadata.numValues); + RYU_ASSERT(offsetInSegment + numValues <= state.metadata.numValues); auto startLength = outputChunk->getNumValues(); if (nullColumn) { nullColumn->scanSegment(*state.nullState, outputChunk->getNullData(), offsetInSegment, @@ -280,12 +280,12 @@ void Column::scan(const ChunkState& state, ColumnChunkData* outputChunk, offset_ [&](auto& segmentState, auto startOffsetInSegment, auto lengthInSegment, auto) { scanSegment(segmentState, outputChunk, startOffsetInSegment, lengthInSegment); }); - KU_ASSERT(outputChunk->getNumValues() == numValuesScanned); + RYU_ASSERT(outputChunk->getNumValues() == numValuesScanned); } void Column::scanSegment(const SegmentState& state, offset_t startOffsetInSegment, offset_t length, uint8_t* result) const { - KU_ASSERT(startOffsetInSegment + length <= state.metadata.numValues); + RYU_ASSERT(startOffsetInSegment + length <= state.metadata.numValues); columnReadWriter->readCompressedValuesToPage(state, result, 0, startOffsetInSegment, length, readToPageFunc); } @@ -329,10 +329,10 @@ void Column::updateStatistics(ColumnChunkMetadata& metadata, offset_t maxIndex, const std::optional& min, const std::optional& max) const { if (maxIndex >= metadata.numValues) { metadata.numValues = maxIndex + 1; - KU_ASSERT(sanityCheckForWrites(metadata, dataType)); + RYU_ASSERT(sanityCheckForWrites(metadata, dataType)); } // Either both or neither should be provided - KU_ASSERT((!min && !max) || (min && max)); + RYU_ASSERT((!min && !max) || (min && max)); if (min && max) { // If new values are outside of the existing min/max, update them if (max->gt(metadata.compMeta.max, dataType.getPhysicalType())) { @@ -414,7 +414,7 @@ bool Column::isEndOffsetOutOfPagesCapacity(const ColumnChunkMetadata& metadata, void Column::checkpointColumnChunkInPlace(SegmentState& state, const ColumnCheckpointState& checkpointState, PageAllocator& pageAllocator) const { for (auto& segmentCheckpointState : checkpointState.segmentCheckpointStates) { - KU_ASSERT(segmentCheckpointState.numRows > 0); + RYU_ASSERT(segmentCheckpointState.numRows > 0); state.column->writeSegment(checkpointState.persistentData, state, segmentCheckpointState.offsetInSegment, segmentCheckpointState.chunkData, segmentCheckpointState.startRowInData, segmentCheckpointState.numRows); @@ -432,12 +432,12 @@ void Column::checkpointNullData(const ColumnCheckpointState& checkpointState, PageAllocator& pageAllocator) const { std::vector nullSegmentCheckpointStates; for (const auto& segmentCheckpointState : checkpointState.segmentCheckpointStates) { - KU_ASSERT(segmentCheckpointState.chunkData.hasNullData()); + RYU_ASSERT(segmentCheckpointState.chunkData.hasNullData()); nullSegmentCheckpointStates.emplace_back(*segmentCheckpointState.chunkData.getNullData(), segmentCheckpointState.startRowInData, segmentCheckpointState.offsetInSegment, segmentCheckpointState.numRows); } - KU_ASSERT(checkpointState.persistentData.hasNullData()); + RYU_ASSERT(checkpointState.persistentData.hasNullData()); nullColumn->checkpointSegment( ColumnCheckpointState(*checkpointState.persistentData.getNullData(), std::move(nullSegmentCheckpointStates)), @@ -450,7 +450,7 @@ std::vector> Column::checkpointColumnChunkOutOf const auto numRows = std::max(checkpointState.endRowIdxToWrite, state.metadata.numValues); checkpointState.persistentData.setToInMemory(); checkpointState.persistentData.resize(numRows); - KU_ASSERT(checkpointState.persistentData.getNumValues() == 0); + RYU_ASSERT(checkpointState.persistentData.getNumValues() == 0); scanSegment(state, &checkpointState.persistentData, 0, state.metadata.numValues); state.reclaimAllocatedPages(pageAllocator); // TODO(bmwinger): for simple compression types, we can predict whether or not we will need to @@ -516,7 +516,7 @@ std::vector> Column::checkpointSegment( } else if (dataType.getPhysicalType() == PhysicalTypeID::FLOAT) { chunkState.getExceptionChunk()->finalizeAndFlushToDisk(chunkState); } else { - KU_UNREACHABLE; + RYU_UNREACHABLE; } checkpointState.persistentData.getMetadata().compMeta.floatMetadata()->exceptionCount = chunkState.metadata.compMeta.floatMetadata()->exceptionCount; @@ -571,7 +571,7 @@ std::unique_ptr ColumnFactory::createColumn(std::string name, LogicalTyp enableCompression); } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } diff --git a/src/storage/table/column_chunk.cpp b/src/storage/table/column_chunk.cpp index e2fa108a63..e512b5fbe8 100644 --- a/src/storage/table/column_chunk.cpp +++ b/src/storage/table/column_chunk.cpp @@ -42,7 +42,7 @@ ColumnChunk::ColumnChunk(MemoryManager& mm, LogicalType&& dataType, uint64_t cap : enableCompression{enableCompression} { data.push_back(ColumnChunkFactory::createColumnChunkData(mm, std::move(dataType), enableCompression, capacity, residencyState, true, initializeToZero)); - KU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); } ColumnChunk::ColumnChunk(MemoryManager& mm, LogicalType&& dataType, bool enableCompression, @@ -82,7 +82,7 @@ void ColumnChunk::scan(const Transaction* transaction, const ChunkState& state, state.column->scan(state, offsetInChunk, length, &output, 0); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } updateInfo.scan(transaction, output, offsetInChunk, length); @@ -90,7 +90,7 @@ void ColumnChunk::scan(const Transaction* transaction, const ChunkState& state, static void scanPersistentSegments(ChunkState& chunkState, ColumnChunkScanner& output, common::offset_t startRow, common::offset_t numRows) { - KU_ASSERT(output.getNumValues() == 0); + RYU_ASSERT(output.getNumValues() == 0); [[maybe_unused]] uint64_t numValuesScanned = chunkState.rangeSegments(startRow, numRows, [&](auto& segmentState, auto offsetInSegment, auto lengthInSegment, auto) { output.scanSegment(offsetInSegment, lengthInSegment, @@ -100,7 +100,7 @@ static void scanPersistentSegments(ChunkState& chunkState, ColumnChunkScanner& o lengthInSegment); }); }); - KU_ASSERT(output.getNumValues() == numValuesScanned); + RYU_ASSERT(output.getNumValues() == numValuesScanned); } void ColumnChunk::scanInMemSegments(ColumnChunkScanner& output, common::offset_t startRow, @@ -195,7 +195,7 @@ void ColumnChunk::update(const Transaction* transaction, offset_t offsetInChunk, } MergedColumnChunkStats ColumnChunk::getMergedColumnChunkStats() const { - KU_ASSERT(!updateInfo.isSet()); + RYU_ASSERT(!updateInfo.isSet()); auto baseStats = MergedColumnChunkStats{ColumnChunkStats{}, true, true}; for (auto& segment : data) { // TODO: Replace with a function that modifies the existing stats in-place? @@ -290,7 +290,7 @@ void ColumnChunk::checkpoint(Column& column, for (size_t i = 0; i < data.size(); i++) { std::vector segmentCheckpointStates; auto& segment = data[i]; - KU_ASSERT(segment->getResidencyState() == ResidencyState::ON_DISK); + RYU_ASSERT(segment->getResidencyState() == ResidencyState::ON_DISK); for (auto& state : chunkCheckpointStates) { const bool isLastSegment = (i == data.size() - 1); if (state.startRow + state.numRows > segmentStart && diff --git a/src/storage/table/column_chunk_data.cpp b/src/storage/table/column_chunk_data.cpp index 2c491c378a..46152280dd 100644 --- a/src/storage/table/column_chunk_data.cpp +++ b/src/storage/table/column_chunk_data.cpp @@ -175,7 +175,7 @@ ColumnChunkData::flush_buffer_func_t ColumnChunkData::initializeFlushBufferFunct } void ColumnChunkData::resetToAllNull() { - KU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); if (nullData) { nullData->resetToAllNull(); } @@ -183,11 +183,11 @@ void ColumnChunkData::resetToAllNull() { } void ColumnChunkData::resetToEmpty() { - KU_ASSERT(residencyState != ResidencyState::ON_DISK); + RYU_ASSERT(residencyState != ResidencyState::ON_DISK); if (nullData) { nullData->resetToEmpty(); } - KU_ASSERT(getBufferSize() == getBufferSize(capacity)); + RYU_ASSERT(getBufferSize() == getBufferSize(capacity)); memset(getData(), 0x00, getBufferSize()); numValues = 0; resetInMemoryStats(); @@ -272,7 +272,7 @@ void ColumnChunkData::resetInMemoryStats() { } ColumnChunkMetadata ColumnChunkData::getMetadataToFlush() const { - KU_ASSERT(numValues <= capacity); + RYU_ASSERT(numValues <= capacity); StorageValue minValue = {}, maxValue = {}; if (capacity > 0) { std::optional nullMask; @@ -285,12 +285,12 @@ ColumnChunkMetadata ColumnChunkData::getMetadataToFlush() const { minValue = min.value_or(StorageValue()); maxValue = max.value_or(StorageValue()); } - KU_ASSERT(getBufferSize() == getBufferSize(capacity)); + RYU_ASSERT(getBufferSize() == getBufferSize(capacity)); return getMetadataFunction(buffer->getBuffer(), numValues, minValue, maxValue); } void ColumnChunkData::append(ValueVector* vector, const SelectionView& selView) { - KU_ASSERT(vector->dataType.getPhysicalType() == dataType.getPhysicalType()); + RYU_ASSERT(vector->dataType.getPhysicalType() == dataType.getPhysicalType()); copyVectorToBuffer(vector, numValues, selView); numValues += selView.getSelSize(); updateStats(vector, selView); @@ -298,12 +298,12 @@ void ColumnChunkData::append(ValueVector* vector, const SelectionView& selView) void ColumnChunkData::append(const ColumnChunkData* other, offset_t startPosInOtherChunk, uint32_t numValuesToAppend) { - KU_ASSERT(other->dataType.getPhysicalType() == dataType.getPhysicalType()); + RYU_ASSERT(other->dataType.getPhysicalType() == dataType.getPhysicalType()); if (nullData) { - KU_ASSERT(nullData->getNumValues() == getNumValues()); + RYU_ASSERT(nullData->getNumValues() == getNumValues()); nullData->append(other->nullData.get(), startPosInOtherChunk, numValuesToAppend); } - KU_ASSERT(numValues + numValuesToAppend <= capacity); + RYU_ASSERT(numValues + numValuesToAppend <= capacity); memcpy(getData() + numValues * numBytesPerValue, other->getData() + startPosInOtherChunk * numBytesPerValue, numValuesToAppend * numBytesPerValue); @@ -336,11 +336,11 @@ ColumnChunkMetadata ColumnChunkData::flushBuffer(PageAllocator& pageAllocator, const PageRange& entry, const ColumnChunkMetadata& otherMetadata) const { const auto bufferSizeToFlush = getBufferSize(numValues); if (!otherMetadata.compMeta.isConstant() && bufferSizeToFlush != 0) { - KU_ASSERT(bufferSizeToFlush <= buffer->getBuffer().size_bytes()); + RYU_ASSERT(bufferSizeToFlush <= buffer->getBuffer().size_bytes()); const auto bufferToFlush = buffer->getBuffer().subspan(0, bufferSizeToFlush); return flushBufferFunction(bufferToFlush, pageAllocator.getDataFH(), entry, otherMetadata); } - KU_ASSERT(otherMetadata.getNumPages() == 0); + RYU_ASSERT(otherMetadata.getNumPages() == 0); return otherMetadata; } @@ -359,7 +359,7 @@ uint64_t ColumnChunkData::getBufferSize(uint64_t capacity_) const { void ColumnChunkData::initializeScanState(SegmentState& state, const Column* column) const { if (nullData) { - KU_ASSERT(state.nullState); + RYU_ASSERT(state.nullState); nullData->initializeScanState(*state.nullState, column->getNullColumn()); } state.column = column; @@ -373,7 +373,7 @@ void ColumnChunkData::initializeScanState(SegmentState& state, const Column* col void ColumnChunkData::scan(ValueVector& output, offset_t offset, length_t length, sel_t posInOutputVector) const { - KU_ASSERT(offset + length <= numValues); + RYU_ASSERT(offset + length <= numValues); if (nullData) { nullData->scan(output, offset, length, posInOutputVector); } @@ -383,7 +383,7 @@ void ColumnChunkData::scan(ValueVector& output, offset_t offset, length_t length void ColumnChunkData::lookup(offset_t offsetInChunk, ValueVector& output, sel_t posInOutputVector) const { - KU_ASSERT(offsetInChunk < capacity); + RYU_ASSERT(offsetInChunk < capacity); output.setNull(posInOutputVector, isNull(offsetInChunk)); if (!output.isNull(posInOutputVector)) { memcpy(output.getData() + posInOutputVector * numBytesPerValue, @@ -393,12 +393,12 @@ void ColumnChunkData::lookup(offset_t offsetInChunk, ValueVector& output, void ColumnChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity multiplicity) { - KU_ASSERT(chunk->dataType.getPhysicalType() == dataType.getPhysicalType() && + RYU_ASSERT(chunk->dataType.getPhysicalType() == dataType.getPhysicalType() && dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && chunk->getNumValues() == dstOffsets->getNumValues()); for (auto i = 0u; i < dstOffsets->getNumValues(); i++) { const auto dstOffset = dstOffsets->getValue(i); - KU_ASSERT(dstOffset < capacity); + RYU_ASSERT(dstOffset < capacity); memcpy(getData() + dstOffset * numBytesPerValue, chunk->getData() + i * numBytesPerValue, numBytesPerValue); numValues = dstOffset >= numValues ? dstOffset + 1 : numValues; @@ -427,7 +427,7 @@ void ColumnChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, // later. Thus, an assertion is added at the first line. void ColumnChunkData::write(const ValueVector* vector, offset_t offsetInVector, offset_t offsetInChunk) { - KU_ASSERT(dataType.getPhysicalType() != PhysicalTypeID::BOOL && + RYU_ASSERT(dataType.getPhysicalType() != PhysicalTypeID::BOOL && dataType.getPhysicalType() != PhysicalTypeID::LIST && dataType.getPhysicalType() != PhysicalTypeID::ARRAY); if (nullData) { @@ -446,7 +446,7 @@ void ColumnChunkData::write(const ValueVector* vector, offset_t offsetInVector, void ColumnChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetInChunk, offset_t dstOffsetInChunk, offset_t numValuesToCopy) { - KU_ASSERT(srcChunk->dataType.getPhysicalType() == dataType.getPhysicalType()); + RYU_ASSERT(srcChunk->dataType.getPhysicalType() == dataType.getPhysicalType()); if ((dstOffsetInChunk + numValuesToCopy) >= numValues) { numValues = dstOffsetInChunk + numValuesToCopy; } @@ -454,7 +454,7 @@ void ColumnChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetI srcChunk->getData() + srcOffsetInChunk * numBytesPerValue, numValuesToCopy * numBytesPerValue); if (nullData) { - KU_ASSERT(srcChunk->getNullData()); + RYU_ASSERT(srcChunk->getNullData()); nullData->write(srcChunk->getNullData(), srcOffsetInChunk, dstOffsetInChunk, numValuesToCopy); } @@ -462,18 +462,18 @@ void ColumnChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetI } void ColumnChunkData::resetNumValuesFromMetadata() { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); numValues = metadata.numValues; if (nullData) { nullData->resetNumValuesFromMetadata(); // FIXME(bmwinger): not always working - // KU_ASSERT(numValues == nullData->numValues); + // RYU_ASSERT(numValues == nullData->numValues); } } void ColumnChunkData::setToInMemory() { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); - KU_ASSERT(capacity == 0 && getBufferSize() == 0); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(capacity == 0 && getBufferSize() == 0); residencyState = ResidencyState::IN_MEMORY; numValues = 0; if (nullData) { @@ -522,7 +522,7 @@ void ColumnChunkData::populateWithDefaultVal(ExpressionEvaluator& defaultEvaluat std::min(DEFAULT_VECTOR_CAPACITY, numValuesToPopulate - numValuesAppended); defaultEvaluator.evaluate(numValuesToAppend); auto resultVector = defaultEvaluator.resultVector.get(); - KU_ASSERT(resultVector->state->getSelVector().getSelSize() == numValuesToAppend); + RYU_ASSERT(resultVector->state->getSelVector().getSelSize() == numValuesToAppend); append(resultVector, resultVector->state->getSelVector()); if (newColumnStats) { newColumnStats->update(resultVector); @@ -534,7 +534,7 @@ void ColumnChunkData::populateWithDefaultVal(ExpressionEvaluator& defaultEvaluat void ColumnChunkData::copyVectorToBuffer(ValueVector* vector, offset_t startPosInChunk, const SelectionView& selView) { auto bufferToWrite = buffer->getBuffer().data() + startPosInChunk * numBytesPerValue; - KU_ASSERT(startPosInChunk + selView.getSelSize() <= capacity); + RYU_ASSERT(startPosInChunk + selView.getSelSize() <= capacity); const auto vectorDataToWriteFrom = vector->getData(); if (nullData) { nullData->appendNulls(vector, selView, startPosInChunk); @@ -550,7 +550,7 @@ void ColumnChunkData::copyVectorToBuffer(ValueVector* vector, offset_t startPosI } void ColumnChunkData::setNumValues(uint64_t numValues_) { - KU_ASSERT(numValues_ <= capacity); + RYU_ASSERT(numValues_ <= capacity); numValues = numValues_; if (nullData) { nullData->setNumValues(numValues_); @@ -576,7 +576,7 @@ uint64_t ColumnChunkData::getEstimatedMemoryUsage() const { } void ColumnChunkData::serialize(Serializer& serializer) const { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); serializer.writeDebuggingInfo("data_type"); dataType.serialize(serializer); serializer.writeDebuggingInfo("metadata"); @@ -633,7 +633,7 @@ std::unique_ptr ColumnChunkData::deserialize(MemoryManager& mem } void BoolChunkData::append(ValueVector* vector, const SelectionView& selView) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::BOOL); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::BOOL); for (auto i = 0u; i < selView.getSelSize(); i++) { const auto pos = selView[i]; NullMask::setNull(getData(), numValues + i, vector->getValue(pos)); @@ -658,7 +658,7 @@ void BoolChunkData::append(const ColumnChunkData* other, offset_t startPosInOthe void BoolChunkData::scan(ValueVector& output, offset_t offset, length_t length, sel_t posInOutputVector) const { - KU_ASSERT(offset + length <= numValues); + RYU_ASSERT(offset + length <= numValues); if (nullData) { nullData->scan(output, offset, length, posInOutputVector); } @@ -670,7 +670,7 @@ void BoolChunkData::scan(ValueVector& output, offset_t offset, length_t length, void BoolChunkData::lookup(offset_t offsetInChunk, ValueVector& output, sel_t posInOutputVector) const { - KU_ASSERT(offsetInChunk < capacity); + RYU_ASSERT(offsetInChunk < capacity); output.setNull(posInOutputVector, nullData->isNull(offsetInChunk)); if (!output.isNull(posInOutputVector)) { output.setValue(posInOutputVector, @@ -679,12 +679,12 @@ void BoolChunkData::lookup(offset_t offsetInChunk, ValueVector& output, } void BoolChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity) { - KU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::BOOL && + RYU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::BOOL && dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && chunk->getNumValues() == dstOffsets->getNumValues()); for (auto i = 0u; i < dstOffsets->getNumValues(); i++) { const auto dstOffset = dstOffsets->getValue(i); - KU_ASSERT(dstOffset < capacity); + RYU_ASSERT(dstOffset < capacity); NullMask::setNull(getData(), dstOffset, chunk->getValue(i)); if (nullData) { nullData->setNull(dstOffset, chunk->getNullData()->isNull(i)); @@ -696,8 +696,8 @@ void BoolChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, R void BoolChunkData::write(const ValueVector* vector, offset_t offsetInVector, offset_t offsetInChunk) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::BOOL); - KU_ASSERT(offsetInChunk < capacity); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::BOOL); + RYU_ASSERT(offsetInChunk < capacity); const auto valueToSet = vector->getValue(offsetInVector); setValue(valueToSet, offsetInChunk); if (nullData) { @@ -746,7 +746,7 @@ void NullChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetInC if (numValuesToCopy == 0) { return; } - KU_ASSERT(srcChunk->getBufferSize() >= sizeof(uint64_t)); + RYU_ASSERT(srcChunk->getBufferSize() >= sizeof(uint64_t)); copyFromBuffer(srcChunk->getData(), srcOffsetInChunk, dstOffsetInChunk, numValuesToCopy); } @@ -765,7 +765,7 @@ bool NullChunkData::haveAllNullsGuaranteed() const { } void NullChunkData::serialize(Serializer& serializer) const { - KU_ASSERT(residencyState == ResidencyState::ON_DISK); + RYU_ASSERT(residencyState == ResidencyState::ON_DISK); serializer.writeDebuggingInfo("null_chunk_metadata"); metadata.serialize(serializer); } @@ -806,7 +806,7 @@ void InternalIDChunkData::append(ValueVector* vector, const SelectionView& selVi copyInt64VectorToBuffer(vector, numValues, selView); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } numValues += selView.getSelSize(); @@ -814,7 +814,7 @@ void InternalIDChunkData::append(ValueVector* vector, const SelectionView& selVi void InternalIDChunkData::copyVectorToBuffer(ValueVector* vector, offset_t startPosInChunk, const SelectionView& selView) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); const auto relIDsInVector = reinterpret_cast(vector->getData()); if (commonTableID == INVALID_TABLE_ID) { commonTableID = relIDsInVector[selView[0]].tableID; @@ -824,7 +824,7 @@ void InternalIDChunkData::copyVectorToBuffer(ValueVector* vector, offset_t start if (vector->isNull(pos)) { continue; } - KU_ASSERT(relIDsInVector[pos].tableID == commonTableID); + RYU_ASSERT(relIDsInVector[pos].tableID == commonTableID); memcpy(getData() + (startPosInChunk + i) * numBytesPerValue, &relIDsInVector[pos].offset, numBytesPerValue); } @@ -832,7 +832,7 @@ void InternalIDChunkData::copyVectorToBuffer(ValueVector* vector, offset_t start void InternalIDChunkData::copyInt64VectorToBuffer(ValueVector* vector, offset_t startPosInChunk, const SelectionView& selView) const { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INT64); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INT64); for (auto i = 0u; i < selView.getSelSize(); i++) { const auto pos = selView[i]; if (vector->isNull(pos)) { @@ -845,8 +845,8 @@ void InternalIDChunkData::copyInt64VectorToBuffer(ValueVector* vector, offset_t void InternalIDChunkData::scan(ValueVector& output, offset_t offset, length_t length, sel_t posInOutputVector) const { - KU_ASSERT(offset + length <= numValues); - KU_ASSERT(commonTableID != INVALID_TABLE_ID); + RYU_ASSERT(offset + length <= numValues); + RYU_ASSERT(commonTableID != INVALID_TABLE_ID); internalID_t relID; relID.tableID = commonTableID; for (auto i = 0u; i < length; i++) { @@ -857,22 +857,22 @@ void InternalIDChunkData::scan(ValueVector& output, offset_t offset, length_t le void InternalIDChunkData::lookup(offset_t offsetInChunk, ValueVector& output, sel_t posInOutputVector) const { - KU_ASSERT(offsetInChunk < capacity); + RYU_ASSERT(offsetInChunk < capacity); internalID_t relID; relID.offset = getValue(offsetInChunk); - KU_ASSERT(commonTableID != INVALID_TABLE_ID); + RYU_ASSERT(commonTableID != INVALID_TABLE_ID); relID.tableID = commonTableID; output.setValue(posInOutputVector, relID); } void InternalIDChunkData::write(const ValueVector* vector, offset_t offsetInVector, offset_t offsetInChunk) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::INTERNAL_ID); const auto relIDsInVector = reinterpret_cast(vector->getData()); if (commonTableID == INVALID_TABLE_ID) { commonTableID = relIDsInVector[offsetInVector].tableID; } - KU_ASSERT(commonTableID == relIDsInVector[offsetInVector].tableID); + RYU_ASSERT(commonTableID == relIDsInVector[offsetInVector].tableID); if (!vector->isNull(offsetInVector)) { memcpy(getData() + offsetInChunk * numBytesPerValue, &relIDsInVector[offsetInVector].offset, numBytesPerValue); @@ -934,7 +934,7 @@ std::unique_ptr ColumnChunkFactory::createColumnChunkData(Memor enableCompression, residencyState); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -979,7 +979,7 @@ std::unique_ptr ColumnChunkFactory::createColumnChunkData(Memor metadata); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -1024,7 +1024,7 @@ void ColumnChunkData::reclaimStorage(PageAllocator& pageAllocator) { uint64_t ColumnChunkData::getSizeOnDisk() const { // Probably could just return the actual size from the metadata if it's on-disk, but it's not // currently needed for on-disk segments - KU_ASSERT(ResidencyState::IN_MEMORY == residencyState); + RYU_ASSERT(ResidencyState::IN_MEMORY == residencyState); auto metadata = getMetadataToFlush(); uint64_t nullSize = 0; if (nullData) { @@ -1036,7 +1036,7 @@ uint64_t ColumnChunkData::getSizeOnDisk() const { uint64_t ColumnChunkData::getSizeOnDiskInMemoryStats() const { // Probably could just return the actual size from the metadata if it's on-disk, but it's not // currently needed for on-disk segments - KU_ASSERT(ResidencyState::IN_MEMORY == residencyState); + RYU_ASSERT(ResidencyState::IN_MEMORY == residencyState); uint64_t nullSize = 0; if (nullData) { nullSize = nullData->getSizeOnDiskInMemoryStats(); diff --git a/src/storage/table/column_chunk_metadata.cpp b/src/storage/table/column_chunk_metadata.cpp index 6a3ad44d6b..70e3efbba6 100644 --- a/src/storage/table/column_chunk_metadata.cpp +++ b/src/storage/table/column_chunk_metadata.cpp @@ -93,7 +93,7 @@ page_idx_t ColumnChunkMetadata::getNumDataPages(PhysicalTypeID dataType) const { [this](T) -> page_idx_t { return FloatCompression::getNumDataPages(getNumPages(), compMeta); }, - [](auto) -> page_idx_t { KU_UNREACHABLE; }); + [](auto) -> page_idx_t { RYU_UNREACHABLE; }); } default: return getNumPages(); @@ -147,7 +147,7 @@ alp::state getAlpMetadata(const T* buffer, uint64_t numValues) { alpMetadata.best_k_combinations, alpMetadata.k_combinations, buffer, numValues, alpMetadata.fac, alpMetadata.exp); } else { - KU_ASSERT(alpMetadata.best_k_combinations.size() == 1); + RYU_ASSERT(alpMetadata.best_k_combinations.size() == 1); alpMetadata.exp = alpMetadata.best_k_combinations[0].first; alpMetadata.fac = alpMetadata.best_k_combinations[0].second; } diff --git a/src/storage/table/column_reader_writer.cpp b/src/storage/table/column_reader_writer.cpp index 4bf3d2ef08..441d88844b 100644 --- a/src/storage/table/column_reader_writer.cpp +++ b/src/storage/table/column_reader_writer.cpp @@ -135,7 +135,7 @@ class DefaultColumnReadWriter final : public ColumnReadWriter { auto cursor = getPageCursorForOffsetInGroup(dstOffset, state.metadata.getStartPageIdx(), state.numValuesPerPage); while (numValuesWritten < numValues) { - KU_ASSERT( + RYU_ASSERT( cursor.pageIdx == INVALID_PAGE_IDX /*constant compression*/ || cursor.pageIdx < state.metadata.getStartPageIdx() + state.metadata.getNumPages()); auto numValuesToWriteInPage = std::min(numValues - numValuesWritten, @@ -177,13 +177,13 @@ class DefaultColumnReadWriter final : public ColumnReadWriter { auto pageCursor = getPageCursorForOffsetInGroup(startOffsetInSegment, chunkMeta.getStartPageIdx(), state.numValuesPerPage); - KU_ASSERT(isPageIdxValid(pageCursor.pageIdx, chunkMeta)); + RYU_ASSERT(isPageIdxValid(pageCursor.pageIdx, chunkMeta)); uint64_t numValuesScanned = 0; while (numValuesScanned < length) { uint64_t numValuesToScanInPage = std::min( state.numValuesPerPage - pageCursor.elemPosInPage, length - numValuesScanned); - KU_ASSERT(isPageIdxValid(pageCursor.pageIdx, chunkMeta)); + RYU_ASSERT(isPageIdxValid(pageCursor.pageIdx, chunkMeta)); if (!filterFunc.has_value() || filterFunc.value()(numValuesScanned, numValuesScanned + numValuesToScanInPage)) { @@ -270,10 +270,10 @@ class FloatColumnReadWriter final : public ColumnReadWriter { exceptionChunk->findFirstExceptionAtOrPastOffset(startOffsetInChunk); for (; curExceptionIdx < exceptionChunk->getExceptionCount(); ++curExceptionIdx) { const auto curException = exceptionChunk->getExceptionAt(curExceptionIdx); - KU_ASSERT(curExceptionIdx == 0 || + RYU_ASSERT(curExceptionIdx == 0 || curException.posInChunk > exceptionChunk->getExceptionAt(curExceptionIdx - 1).posInChunk); - KU_ASSERT(curException.posInChunk >= curExceptionIdx); + RYU_ASSERT(curException.posInChunk >= curExceptionIdx); if (curException.posInChunk >= startOffsetInChunk + numValuesToScan) { break; } @@ -295,7 +295,7 @@ class FloatColumnReadWriter final : public ColumnReadWriter { OutputType result, uint32_t offsetInResult, const read_value_from_page_func_t& readFunc) { RUNTIME_CHECK(const ColumnChunkMetadata& metadata = state.metadata); - KU_ASSERT(metadata.compMeta.compression == CompressionType::ALP || + RYU_ASSERT(metadata.compMeta.compression == CompressionType::ALP || metadata.compMeta.compression == CompressionType::CONSTANT || metadata.compMeta.compression == CompressionType::UNCOMPRESSED); std::optional filterFunc{}; @@ -309,7 +309,7 @@ class FloatColumnReadWriter final : public ColumnReadWriter { const read_values_from_page_func_t& readFunc, const std::optional& filterFunc) { const ColumnChunkMetadata& metadata = state.metadata; - KU_ASSERT(metadata.compMeta.compression == CompressionType::ALP || + RYU_ASSERT(metadata.compMeta.compression == CompressionType::ALP || metadata.compMeta.compression == CompressionType::CONSTANT || metadata.compMeta.compression == CompressionType::UNCOMPRESSED); @@ -433,7 +433,7 @@ void ColumnReadWriter::updatePageWithCursor(PageCursor cursor, writeOp(nullptr, cursor.elemPosInPage); return; } - KU_ASSERT(cursor.pageIdx < dataFH->getNumPages()); + RYU_ASSERT(cursor.pageIdx < dataFH->getNumPages()); ShadowUtils::updatePage(*dataFH, cursor.pageIdx, false /*insertingNewPage*/, *shadowFile, [&](auto frame) { writeOp(frame, cursor.elemPosInPage); }); @@ -442,7 +442,7 @@ void ColumnReadWriter::updatePageWithCursor(PageCursor cursor, // This function returns the page pageIdx of the page where element will be found and the pos of // the element in the page as the offset. static PageCursor getPageCursorForPos(uint64_t elementPos, uint32_t numElementsPerPage) { - KU_ASSERT((elementPos / numElementsPerPage) < UINT32_MAX); + RYU_ASSERT((elementPos / numElementsPerPage) < UINT32_MAX); return PageCursor{static_cast(elementPos / numElementsPerPage), static_cast(elementPos % numElementsPerPage)}; } diff --git a/src/storage/table/compression_flush_buffer.cpp b/src/storage/table/compression_flush_buffer.cpp index 8f94f468a7..fe49be7ee0 100644 --- a/src/storage/table/compression_flush_buffer.cpp +++ b/src/storage/table/compression_flush_buffer.cpp @@ -14,8 +14,8 @@ using namespace transaction; ColumnChunkMetadata uncompressedFlushBuffer(std::span buffer, FileHandle* dataFH, const PageRange& entry, const ColumnChunkMetadata& metadata) { - KU_ASSERT(dataFH->getNumPages() >= entry.startPageIdx + entry.numPages); - KU_ASSERT(buffer.size_bytes() <= entry.numPages * RYU_PAGE_SIZE); + RYU_ASSERT(dataFH->getNumPages() >= entry.startPageIdx + entry.numPages); + RYU_ASSERT(buffer.size_bytes() <= entry.numPages * RYU_PAGE_SIZE); dataFH->writePagesToFile(buffer.data(), buffer.size(), entry.startPageIdx); return ColumnChunkMetadata(entry.startPageIdx, entry.numPages, metadata.numValues, metadata.compMeta); @@ -28,7 +28,7 @@ ColumnChunkMetadata CompressedFlushBuffer::operator()(std::span b const auto compressedBuffer = std::make_unique(RYU_PAGE_SIZE); auto numPages = 0u; const auto numValuesPerPage = metadata.compMeta.numValues(RYU_PAGE_SIZE, dataType); - KU_ASSERT(numValuesPerPage * entry.numPages >= metadata.numValues); + RYU_ASSERT(numValuesPerPage * entry.numPages >= metadata.numValues); while (valuesRemaining > 0) { const auto compressedSize = alg->compressNextPage(bufferStart, valuesRemaining, compressedBuffer.get(), RYU_PAGE_SIZE, metadata.compMeta); @@ -42,8 +42,8 @@ ColumnChunkMetadata CompressedFlushBuffer::operator()(std::span b if (compressedSize < RYU_PAGE_SIZE) { memset(compressedBuffer.get() + compressedSize, 0, RYU_PAGE_SIZE - compressedSize); } - KU_ASSERT(numPages < entry.numPages); - KU_ASSERT(dataFH->getNumPages() >= entry.startPageIdx + numPages); + RYU_ASSERT(numPages < entry.numPages); + RYU_ASSERT(dataFH->getNumPages() >= entry.startPageIdx + numPages); dataFH->writePageToFile(compressedBuffer.get(), entry.startPageIdx + numPages); numPages++; } @@ -67,10 +67,10 @@ std::pair, uint64_t> flushCompressedFloats(const Comp const auto& castedAlg = ku_dynamic_cast&>(alg); const auto* floatMetadata = metadata.compMeta.floatMetadata(); - KU_ASSERT(floatMetadata->exceptionCapacity >= floatMetadata->exceptionCount); + RYU_ASSERT(floatMetadata->exceptionCapacity >= floatMetadata->exceptionCount); auto valuesRemaining = metadata.numValues; - KU_ASSERT(valuesRemaining <= buffer.size_bytes() / sizeof(T)); + RYU_ASSERT(valuesRemaining <= buffer.size_bytes() / sizeof(T)); const size_t exceptionBufferSize = EncodeException::numPagesFromExceptions(floatMetadata->exceptionCapacity) * @@ -79,7 +79,7 @@ std::pair, uint64_t> flushCompressedFloats(const Comp std::byte* exceptionBufferCursor = reinterpret_cast(exceptionBuffer.get()); const auto numValuesPerPage = metadata.compMeta.numValues(RYU_PAGE_SIZE, dataType); - KU_ASSERT(numValuesPerPage * metadata.getNumDataPages(dataType) >= metadata.numValues); + RYU_ASSERT(numValuesPerPage * metadata.getNumDataPages(dataType) >= metadata.numValues); const auto compressedBuffer = std::make_unique(RYU_PAGE_SIZE); const uint8_t* bufferCursor = buffer.data(); @@ -105,13 +105,13 @@ std::pair, uint64_t> flushCompressedFloats(const Comp } else { valuesRemaining -= numValuesPerPage; } - KU_ASSERT(numPages < entry.numPages); - KU_ASSERT(dataFH->getNumPages() >= entry.startPageIdx + numPages); + RYU_ASSERT(numPages < entry.numPages); + RYU_ASSERT(dataFH->getNumPages() >= entry.startPageIdx + numPages); dataFH->writePageToFile(compressedBuffer.get(), entry.startPageIdx + numPages); numPages++; } - KU_ASSERT(totalExceptionCount == floatMetadata->exceptionCount); + RYU_ASSERT(totalExceptionCount == floatMetadata->exceptionCount); return {std::move(exceptionBuffer), exceptionBufferSize}; } @@ -127,7 +127,7 @@ void flushALPExceptions(std::span exceptionBuffer, FileHandle* da const auto exceptionStartPageIdx = entry.startPageIdx + entry.numPages - preExceptionMetadata.getNumPages(); - KU_ASSERT(exceptionStartPageIdx + preExceptionMetadata.getNumPages() <= dataFH->getNumPages()); + RYU_ASSERT(exceptionStartPageIdx + preExceptionMetadata.getNumPages() <= dataFH->getNumPages()); PageRange exceptionBlock{exceptionStartPageIdx, preExceptionMetadata.getNumPages()}; CompressedFlushBuffer exceptionFlushBuffer{ @@ -155,7 +155,7 @@ ColumnChunkMetadata CompressedFloatFlushBuffer::operator()(std::span(*alg, dataType, buffer, dataFH, entry, metadata); diff --git a/src/storage/table/csr_chunked_node_group.cpp b/src/storage/table/csr_chunked_node_group.cpp index 3479f7a441..388f76d653 100644 --- a/src/storage/table/csr_chunked_node_group.cpp +++ b/src/storage/table/csr_chunked_node_group.cpp @@ -47,7 +47,7 @@ CSRRegion CSRRegion::upgradeLevel(const std::vector& leafRegions, const idx_t rightLeafRegionIdx = newRegion.getRightLeafRegionIdx(); for (auto leafRegionIdx = leftLeafRegionIdx; leafRegionIdx <= rightLeafRegionIdx; leafRegionIdx++) { - KU_ASSERT(leafRegionIdx < leafRegions.size()); + RYU_ASSERT(leafRegionIdx < leafRegions.size()); newRegion.sizeChange += leafRegions[leafRegionIdx].sizeChange; newRegion.hasPersistentDeletions |= leafRegions[leafRegionIdx].hasPersistentDeletions; newRegion.hasInsertions |= leafRegions[leafRegionIdx].hasInsertions; @@ -152,7 +152,7 @@ offset_vec_t ChunkedCSRHeader::populateStartCSROffsetsFromLength(bool leaveGaps) void ChunkedCSRHeader::populateEndCSROffsetFromStartAndLength() const { [[maybe_unused]] const auto numNodes = length->getNumValues(); - KU_ASSERT(offset->getNumValues() == numNodes); + RYU_ASSERT(offset->getNumValues() == numNodes); // TODO(bmwinger): maybe there's a way of also vectorizing this for the length chunk, E.g. a // forEach over two values offset->mapValues( @@ -163,7 +163,7 @@ void ChunkedCSRHeader::finalizeCSRRegionEndOffsets( const offset_vec_t& rightCSROffsetOfRegions) const { const auto numNodes = length->getNumValues(); const auto numLeafRegions = getNumRegions(); - KU_ASSERT(numLeafRegions == rightCSROffsetOfRegions.size()); + RYU_ASSERT(numLeafRegions == rightCSROffsetOfRegions.size()); for (auto regionIdx = 0u; regionIdx < numLeafRegions; regionIdx++) { CSRRegion region{regionIdx, 0 /* level*/}; const auto rightNodeOffset = std::min(region.rightNodeOffset, numNodes - 1); @@ -173,14 +173,14 @@ void ChunkedCSRHeader::finalizeCSRRegionEndOffsets( idx_t ChunkedCSRHeader::getNumRegions() const { const auto numNodes = length->getNumValues(); - KU_ASSERT(offset->getNumValues() == numNodes); + RYU_ASSERT(offset->getNumValues() == numNodes); return (numNodes + StorageConfig::CSR_LEAF_REGION_SIZE - 1) / StorageConfig::CSR_LEAF_REGION_SIZE; } void ChunkedCSRHeader::populateRegionCSROffsets(const CSRRegion& region, const ChunkedCSRHeader& oldHeader) const { - KU_ASSERT(region.level <= CSRNodeGroup::DEFAULT_PACKED_CSR_INFO.calibratorTreeHeight); + RYU_ASSERT(region.level <= CSRNodeGroup::DEFAULT_PACKED_CSR_INFO.calibratorTreeHeight); const auto leftNodeOffset = region.leftNodeOffset; const auto rightNodeOffset = region.rightNodeOffset; const auto leftCSROffset = oldHeader.getStartCSROffset(leftNodeOffset); @@ -192,13 +192,13 @@ void ChunkedCSRHeader::populateRegionCSROffsets(const CSRRegion& region, offset->setValue(leftCSROffset + numRelsInRegion, i); } // We should keep the region stable and the old right CSR offset is the end of the region. - KU_ASSERT(offset->getValue(rightNodeOffset) <= oldRightCSROffset); + RYU_ASSERT(offset->getValue(rightNodeOffset) <= oldRightCSROffset); offset->setValue(oldRightCSROffset, rightNodeOffset); } void ChunkedCSRHeader::populateEndCSROffsets(const offset_vec_t& gaps) const { - KU_ASSERT(offset->getNumValues() == length->getNumValues()); - KU_ASSERT(offset->getNumValues() == gaps.size()); + RYU_ASSERT(offset->getNumValues() == length->getNumValues()); + RYU_ASSERT(offset->getNumValues() == gaps.size()); offset->mapValues([&](offset_t& offset, auto i) { offset = gaps[i]; }); } @@ -218,7 +218,7 @@ std::unique_ptr InMemChunkedCSRNodeGroup::flush( auto flushedChunkedGroup = std::make_unique(std::move(newCSRHeader), std::move(flushedChunks), 0 /*startRowIdx*/); flushedChunkedGroup->versionInfo = std::make_unique(); - KU_ASSERT(numRows == flushedChunkedGroup->getNumRows()); + RYU_ASSERT(numRows == flushedChunkedGroup->getNumRows()); flushedChunkedGroup->versionInfo->append(transaction->getID(), 0, numRows); return flushedChunkedGroup; } @@ -240,17 +240,17 @@ void ChunkedCSRNodeGroup::scanCSRHeader(MemoryManager& memoryManager, false /*enableCompression*/, StorageConfig::NODE_GROUP_SIZE); } ChunkState headerChunkState; - KU_ASSERT(csrHeader.offset->getResidencyState() == ResidencyState::ON_DISK); - KU_ASSERT(csrHeader.length->getResidencyState() == ResidencyState::ON_DISK); + RYU_ASSERT(csrHeader.offset->getResidencyState() == ResidencyState::ON_DISK); + RYU_ASSERT(csrHeader.length->getResidencyState() == ResidencyState::ON_DISK); csrHeader.offset->initializeScanState(headerChunkState, csrState.csrOffsetColumn); - KU_ASSERT(csrState.csrOffsetColumn && csrState.csrLengthColumn); + RYU_ASSERT(csrState.csrOffsetColumn && csrState.csrLengthColumn); csrState.csrOffsetColumn->scan(headerChunkState, csrState.oldHeader->offset.get()); csrHeader.length->initializeScanState(headerChunkState, csrState.csrLengthColumn); csrState.csrLengthColumn->scan(headerChunkState, csrState.oldHeader->length.get()); } void ChunkedCSRNodeGroup::serialize(Serializer& serializer) const { - KU_ASSERT(csrHeader.offset && csrHeader.length); + RYU_ASSERT(csrHeader.offset && csrHeader.length); serializer.writeDebuggingInfo("csr_header_offset"); csrHeader.offset->serialize(serializer); serializer.writeDebuggingInfo("csr_header_length"); @@ -299,7 +299,7 @@ void InMemChunkedCSRHeader::fillDefaultValues(const offset_t newNumValues) const offset->setValue(lastCSROffset, i); length->setValue(0, i); } - KU_ASSERT( + RYU_ASSERT( offset->getNumValues() >= newNumValues && length->getNumValues() == offset->getNumValues()); } @@ -366,9 +366,9 @@ bool InMemChunkedCSRHeader::sanityCheck() const { } void InMemChunkedCSRHeader::copyFrom(const InMemChunkedCSRHeader& other) const { - KU_ASSERT(offset->getNumValues() == length->getNumValues()); - KU_ASSERT(other.offset->getNumValues() == other.length->getNumValues()); - KU_ASSERT(other.offset->getCapacity() == offset->getCapacity()); + RYU_ASSERT(offset->getNumValues() == length->getNumValues()); + RYU_ASSERT(other.offset->getNumValues() == other.length->getNumValues()); + RYU_ASSERT(other.offset->getCapacity() == offset->getCapacity()); const auto numOtherValues = other.offset->getNumValues(); memcpy(offset->getData(), other.offset->getData(), numOtherValues * sizeof(offset_t)); memcpy(length->getData(), other.length->getData(), numOtherValues * sizeof(length_t)); @@ -407,7 +407,7 @@ offset_vec_t InMemChunkedCSRHeader::populateStartCSROffsetsFromLength(bool leave void InMemChunkedCSRHeader::populateEndCSROffsetFromStartAndLength() const { const auto numNodes = length->getNumValues(); - KU_ASSERT(offset->getNumValues() == numNodes); + RYU_ASSERT(offset->getNumValues() == numNodes); const auto csrOffsets = reinterpret_cast(offset->getData()); const auto csrLengths = reinterpret_cast(length->getData()); for (auto i = 0u; i < numNodes; i++) { @@ -419,7 +419,7 @@ void InMemChunkedCSRHeader::finalizeCSRRegionEndOffsets( const offset_vec_t& rightCSROffsetOfRegions) const { const auto numNodes = length->getNumValues(); const auto numLeafRegions = getNumRegions(); - KU_ASSERT(numLeafRegions == rightCSROffsetOfRegions.size()); + RYU_ASSERT(numLeafRegions == rightCSROffsetOfRegions.size()); for (auto regionIdx = 0u; regionIdx < numLeafRegions; regionIdx++) { CSRRegion region{regionIdx, 0 /* level*/}; const auto rightNodeOffset = std::min(region.rightNodeOffset, numNodes - 1); @@ -429,14 +429,14 @@ void InMemChunkedCSRHeader::finalizeCSRRegionEndOffsets( idx_t InMemChunkedCSRHeader::getNumRegions() const { const auto numNodes = length->getNumValues(); - KU_ASSERT(offset->getNumValues() == numNodes); + RYU_ASSERT(offset->getNumValues() == numNodes); return (numNodes + StorageConfig::CSR_LEAF_REGION_SIZE - 1) / StorageConfig::CSR_LEAF_REGION_SIZE; } void InMemChunkedCSRHeader::populateRegionCSROffsets(const CSRRegion& region, const InMemChunkedCSRHeader& oldHeader) const { - KU_ASSERT(region.level <= CSRNodeGroup::DEFAULT_PACKED_CSR_INFO.calibratorTreeHeight); + RYU_ASSERT(region.level <= CSRNodeGroup::DEFAULT_PACKED_CSR_INFO.calibratorTreeHeight); const auto leftNodeOffset = region.leftNodeOffset; const auto rightNodeOffset = region.rightNodeOffset; const auto leftCSROffset = oldHeader.getStartCSROffset(leftNodeOffset); @@ -449,14 +449,14 @@ void InMemChunkedCSRHeader::populateRegionCSROffsets(const CSRRegion& region, csrOffsets[i] = leftCSROffset + numRelsInRegion; } // We should keep the region stable and the old right CSR offset is the end of the region. - KU_ASSERT(csrOffsets[rightNodeOffset] <= oldRightCSROffset); + RYU_ASSERT(csrOffsets[rightNodeOffset] <= oldRightCSROffset); csrOffsets[rightNodeOffset] = oldRightCSROffset; } void InMemChunkedCSRHeader::populateEndCSROffsets(const offset_vec_t& gaps) const { const auto csrOffsets = reinterpret_cast(offset->getData()); - KU_ASSERT(offset->getNumValues() == length->getNumValues()); - KU_ASSERT(offset->getNumValues() == gaps.size()); + RYU_ASSERT(offset->getNumValues() == length->getNumValues()); + RYU_ASSERT(offset->getNumValues() == gaps.size()); for (auto i = 0u; i < offset->getNumValues(); i++) { csrOffsets[i] += gaps[i]; } diff --git a/src/storage/table/csr_node_group.cpp b/src/storage/table/csr_node_group.cpp index 0100dc7ebd..b12a14331f 100644 --- a/src/storage/table/csr_node_group.cpp +++ b/src/storage/table/csr_node_group.cpp @@ -31,7 +31,7 @@ bool CSRNodeGroupScanState::tryScanCachedTuples(RelTableScanState& tableScanStat // Out of the bound of cached rows. return false; } - KU_ASSERT(nextCachedRowToScan >= nextRowToScan - numCachedRows); + RYU_ASSERT(nextCachedRowToScan >= nextRowToScan - numCachedRows); const auto numRowsToScan = std::min(nextRowToScan, startCSROffset + csrLength) - nextCachedRowToScan; const auto startCachedRow = nextCachedRowToScan - (nextRowToScan - numCachedRows); @@ -61,7 +61,7 @@ bool CSRNodeGroupScanState::tryScanCachedTuples(RelTableScanState& tableScanStat void CSRNodeGroup::initializeScanState(const Transaction* transaction, TableScanState& state) const { auto& relScanState = state.cast(); - KU_ASSERT(relScanState.nodeGroupScanState); + RYU_ASSERT(relScanState.nodeGroupScanState); auto& nodeGroupScanState = relScanState.nodeGroupScanState->cast(); if (relScanState.nodeGroupIdx != nodeGroupIdx || relScanState.randomLookup) { relScanState.nodeGroupIdx = nodeGroupIdx; @@ -104,7 +104,7 @@ void CSRNodeGroup::initScanForCommittedPersistent(const Transaction* transaction auto& chunk = persistentChunkGroup->getColumnChunk(relScanState.columnIDs[i]); chunk.initializeScanState(nodeGroupScanState.chunkStates[i], relScanState.columns[i]); } - KU_ASSERT(csrHeader.offset->getNumValues() == csrHeader.length->getNumValues()); + RYU_ASSERT(csrHeader.offset->getNumValues() == csrHeader.length->getNumValues()); if (relScanState.randomLookup) { auto pos = relScanState.nodeIDVector->state->getSelVector()[0]; auto nodeOffset = relScanState.nodeIDVector->readNodeOffset(pos); @@ -163,7 +163,7 @@ NodeGroupScanResult CSRNodeGroup::scan(const Transaction* transaction, return NODE_GROUP_SCAN_EMPTY_RESULT; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -199,7 +199,7 @@ NodeGroupScanResult CSRNodeGroup::scanCommittedPersistentWithCache(const Transac if (startCSROffset > nodeGroupScanState.nextRowToScan) { nodeGroupScanState.nextRowToScan = startCSROffset; } - KU_ASSERT(nodeGroupScanState.nextRowToScan <= nodeGroupScanState.numTotalRows); + RYU_ASSERT(nodeGroupScanState.nextRowToScan <= nodeGroupScanState.numTotalRows); const auto numToScan = std::min(nodeGroupScanState.numTotalRows - nodeGroupScanState.nextRowToScan, DEFAULT_VECTOR_CAPACITY); @@ -255,7 +255,7 @@ NodeGroupScanResult CSRNodeGroup::scanCommittedInMem(const Transaction* transact nodeGroupScanState.inMemCSRList = csrIndex->indices[offsetInGroup]; } if (!nodeGroupScanState.inMemCSRList.isSequential) { - KU_ASSERT(std::is_sorted(nodeGroupScanState.inMemCSRList.rowIndices.begin(), + RYU_ASSERT(std::is_sorted(nodeGroupScanState.inMemCSRList.rowIndices.begin(), nodeGroupScanState.inMemCSRList.rowIndices.end())); } auto scanResult = @@ -319,7 +319,7 @@ NodeGroupScanResult CSRNodeGroup::scanCommittedInMemRandom(const Transaction* tr const auto lock = chunkedGroups.lock(); chunkedGroup = chunkedGroups.getGroup(lock, chunkIdx); } - KU_ASSERT(chunkedGroup); + RYU_ASSERT(chunkedGroup); numSelected += chunkedGroup->lookup(transaction, tableState, nodeGroupScanState, rowInChunk, numSelected); nextRow++; @@ -380,7 +380,7 @@ void CSRNodeGroup::updateCSRIndex(offset_t boundNodeOffsetInGroup, row_idx_t sta if (sequential) { nodeCSRIndex.isSequential = true; if (!nodeCSRIndex.rowIndices.empty()) { - KU_ASSERT(appendToEndOfCSR); + RYU_ASSERT(appendToEndOfCSR); nodeCSRIndex.rowIndices[1] += length; } else { nodeCSRIndex.rowIndices.resize(2); @@ -401,11 +401,11 @@ void CSRNodeGroup::update(const Transaction* transaction, CSRNodeGroupScanSource row_idx_t rowIdxInGroup, column_id_t columnID, const ValueVector& propertyVector) { switch (source) { case CSRNodeGroupScanSource::COMMITTED_PERSISTENT: { - KU_ASSERT(persistentChunkGroup); + RYU_ASSERT(persistentChunkGroup); return persistentChunkGroup->update(transaction, rowIdxInGroup, columnID, propertyVector); } case CSRNodeGroupScanSource::COMMITTED_IN_MEMORY: { - KU_ASSERT(csrIndex); + RYU_ASSERT(csrIndex); auto [chunkIdx, rowInChunk] = StorageUtils::getQuotientRemainder(rowIdxInGroup, StorageConfig::CHUNKED_NODE_GROUP_CAPACITY); const auto lock = chunkedGroups.lock(); @@ -413,7 +413,7 @@ void CSRNodeGroup::update(const Transaction* transaction, CSRNodeGroupScanSource return chunkedGroup->update(transaction, rowInChunk, columnID, propertyVector); } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -423,11 +423,11 @@ bool CSRNodeGroup::delete_(const Transaction* transaction, CSRNodeGroupScanSourc row_idx_t rowIdxInGroup) { switch (source) { case CSRNodeGroupScanSource::COMMITTED_PERSISTENT: { - KU_ASSERT(persistentChunkGroup); + RYU_ASSERT(persistentChunkGroup); return persistentChunkGroup->delete_(transaction, rowIdxInGroup); } case CSRNodeGroupScanSource::COMMITTED_IN_MEMORY: { - KU_ASSERT(csrIndex); + RYU_ASSERT(csrIndex); auto [chunkIdx, rowInChunk] = StorageUtils::getQuotientRemainder(rowIdxInGroup, StorageConfig::CHUNKED_NODE_GROUP_CAPACITY); const auto lock = chunkedGroups.lock(); @@ -502,7 +502,7 @@ void CSRNodeGroup::checkpointInMemAndOnDisk(const UniqLock& lock, NodeGroupCheck csrState.newHeader->setNumValues(StorageConfig::NODE_GROUP_SIZE); csrState.newHeader->copyFrom(*csrState.oldHeader); auto leafRegions = collectLeafRegionsAndCSRLength(lock, csrState); - KU_ASSERT(std::is_sorted(leafRegions.begin(), leafRegions.end(), + RYU_ASSERT(std::is_sorted(leafRegions.begin(), leafRegions.end(), [](const auto& a, const auto& b) { return a.regionIdx < b.regionIdx; })); const auto regionsToCheckpoint = mergeRegionsToCheckpoint(csrState, leafRegions); if (regionsToCheckpoint.empty()) { @@ -526,7 +526,7 @@ void CSRNodeGroup::checkpointInMemAndOnDisk(const UniqLock& lock, NodeGroupCheck csrState.newHeader->populateRegionCSROffsets(region, *csrState.oldHeader); // The left node offset of a region should always maintain stable across length and // offset changes. - KU_ASSERT(csrState.oldHeader->getStartCSROffset(region.leftNodeOffset) == + RYU_ASSERT(csrState.oldHeader->getStartCSROffset(region.leftNodeOffset) == csrState.newHeader->getStartCSROffset(region.leftNodeOffset)); } } @@ -541,7 +541,7 @@ void CSRNodeGroup::checkpointInMemAndOnDisk(const UniqLock& lock, NodeGroupCheck reclaimStorage(csrState.pageAllocator, lock); persistentChunkGroup = nullptr; } else { - KU_ASSERT(csrState.newHeader->sanityCheck()); + RYU_ASSERT(csrState.newHeader->sanityCheck()); for (const auto columnID : csrState.columnIDs) { checkpointColumn(lock, columnID, csrState, regionsToCheckpoint); } @@ -568,11 +568,11 @@ std::vector CSRNodeGroup::collectLeafRegionsAndCSRLength(const UniqLo void CSRNodeGroup::redistributeCSRRegions(const CSRNodeGroupCheckpointState& csrState, const std::vector& leafRegions) { - KU_ASSERT(std::is_sorted(leafRegions.begin(), leafRegions.end(), + RYU_ASSERT(std::is_sorted(leafRegions.begin(), leafRegions.end(), [](const auto& a, const auto& b) { return a.regionIdx < b.regionIdx; })); - KU_ASSERT(std::all_of(leafRegions.begin(), leafRegions.end(), + RYU_ASSERT(std::all_of(leafRegions.begin(), leafRegions.end(), [](const CSRRegion& region) { return region.level == 0; })); - KU_UNUSED(leafRegions); + RYU_UNUSED(leafRegions); const auto rightCSROffsetOfRegions = csrState.newHeader->populateStartCSROffsetsFromLength(true /* leaveGaps */); csrState.newHeader->populateEndCSROffsetFromStartAndLength(); @@ -734,7 +734,7 @@ static void writeCSRListNoPersistentDeletions(CheckpointReadCursor& readCursor, if (!canSkipWrite(readCursor, writeCursor)) { [[maybe_unused]] auto [readSegmentData, readOffsetInSegment] = readCursor.getDataToRead(); - KU_ASSERT(readSegmentData == segmentData.segmentData.get() && + RYU_ASSERT(readSegmentData == segmentData.segmentData.get() && readOffsetInSegment == offsetInSegment); writeCursor.appendToCurrentSegment(segmentData.segmentData.get(), offsetInSegment, lengthInSegment); @@ -764,7 +764,7 @@ static void writeCSRListWithPersistentDeletions(CheckpointReadCursor& readCursor static void writeInMemoryCSRInsertion(CheckpointWriteCursor& writeCursor, const ChunkedNodeGroup& chunkedGroup, row_idx_t rowInChunk, column_id_t columnID, ChunkState& chunkState) { - KU_ASSERT(!chunkedGroup.isDeleted(&DUMMY_CHECKPOINT_TRANSACTION, rowInChunk)); + RYU_ASSERT(!chunkedGroup.isDeleted(&DUMMY_CHECKPOINT_TRANSACTION, rowInChunk)); chunkedGroup.getColumnChunk(columnID).scanCommitted( &DUMMY_CHECKPOINT_TRANSACTION, chunkState, writeCursor.getCurrentSegmentForWrite(1), rowInChunk, 1); @@ -806,7 +806,7 @@ std::vector CSRNodeGroup::checkpointColumnInRegion(const U column_id_t columnID, const CSRNodeGroupCheckpointState& csrState, const CSRRegion& region) const { const auto leftCSROffset = csrState.oldHeader->getStartCSROffset(region.leftNodeOffset); - KU_ASSERT(leftCSROffset == csrState.newHeader->getStartCSROffset(region.leftNodeOffset)); + RYU_ASSERT(leftCSROffset == csrState.newHeader->getStartCSROffset(region.leftNodeOffset)); const auto rightCSROffset = csrState.oldHeader->getEndCSROffset(region.rightNodeOffset); const auto numOldRowsInRegion = rightCSROffset - leftCSROffset; @@ -830,8 +830,8 @@ std::vector CSRNodeGroup::checkpointColumnInRegion(const U nodeOffset++) { const auto oldCSRLength = csrState.oldHeader->getCSRLength(nodeOffset); - KU_ASSERT(csrState.newHeader->getStartCSROffset(nodeOffset) == writeCursor.getCSROffset()); - KU_ASSERT(csrState.oldHeader->getStartCSROffset(nodeOffset) == readCursor.getCSROffset()); + RYU_ASSERT(csrState.newHeader->getStartCSROffset(nodeOffset) == writeCursor.getCSROffset()); + RYU_ASSERT(csrState.oldHeader->getStartCSROffset(nodeOffset) == readCursor.getCSROffset()); // Copy old csr list with updates into the new chunk. if (!region.hasPersistentDeletions) { @@ -860,16 +860,16 @@ std::vector CSRNodeGroup::checkpointColumnInRegion(const U const length_t numGaps = csrState.newHeader->getGapSize(nodeOffset); const length_t numOldGaps = csrState.oldHeader->getGapSize(nodeOffset); // Gaps should only happen at the end of the CSR region. - KU_ASSERT(numGaps == 0 || (nodeOffset == region.rightNodeOffset - 1) || + RYU_ASSERT(numGaps == 0 || (nodeOffset == region.rightNodeOffset - 1) || (nodeOffset + 1) % StorageConfig::CSR_LEAF_REGION_SIZE == 0); fillCSRGaps(readCursor, writeCursor, dummyChunkForNulls.get(), numOldGaps, numGaps); } writeCursor.finalize(); - KU_ASSERT(readCursor.getCSROffset() - leftCSROffset == numOldRowsInRegion); - KU_ASSERT( + RYU_ASSERT(readCursor.getCSROffset() - leftCSROffset == numOldRowsInRegion); + RYU_ASSERT( writeCursor.getCSROffset() == csrState.newHeader->getEndCSROffset(region.rightNodeOffset)); // We can't skip writing appends as they need to be flushed to disk - KU_ASSERT(readCursor.getCSROffset() == writeCursor.getCSROffset() || ret.empty() || + RYU_ASSERT(readCursor.getCSROffset() == writeCursor.getCSROffset() || ret.empty() || ret.back().startRow + ret.back().numRows == writeCursor.getCSROffset()); return ret; } @@ -877,7 +877,7 @@ std::vector CSRNodeGroup::checkpointColumnInRegion(const U void CSRNodeGroup::checkpointCSRHeaderColumns(const CSRNodeGroupCheckpointState& csrState) const { std::vector csrOffsetChunkCheckpointStates; const auto numNodes = csrState.newHeader->offset->getNumValues(); - KU_ASSERT(numNodes == csrState.newHeader->length->getNumValues()); + RYU_ASSERT(numNodes == csrState.newHeader->length->getNumValues()); csrOffsetChunkCheckpointStates.push_back( ChunkCheckpointState{std::move(csrState.newHeader->offset), 0, numNodes}); persistentChunkGroup->cast().getCSRHeader().offset->checkpoint( @@ -917,7 +917,7 @@ void CSRNodeGroup::collectInMemRegionChangesAndUpdateHeaderLength(const UniqLock numInMemDeletionsInCSR++; } } - KU_ASSERT(numInMemDeletionsInCSR <= numInsertedRows); + RYU_ASSERT(numInMemDeletionsInCSR <= numInsertedRows); numInsertedRows -= numInMemDeletionsInCSR; const auto oldLength = csrState.oldHeader->getCSRLength(nodeOffset); const auto newLength = oldLength + numInsertedRows; @@ -943,7 +943,7 @@ void CSRNodeGroup::collectOnDiskRegionChangesAndUpdateHeaderLength(const UniqLoc } numDeletionsInRegion += numDeletedRows; const auto currentLength = csrState.newHeader->getCSRLength(nodeOffset); - KU_ASSERT(currentLength >= numDeletedRows); + RYU_ASSERT(currentLength >= numDeletedRows); csrState.newHeader->length->setValue(currentLength - numDeletedRows, nodeOffset); } @@ -979,7 +979,7 @@ static DataChunk initScanDataChunk(const CSRNodeGroupCheckpointState& csrState, DataChunk dataChunk(csrState.columnIDs.size(), scanChunkState); for (auto i = 0u; i < csrState.columnIDs.size(); i++) { const auto columnID = csrState.columnIDs[i]; - KU_ASSERT(columnID < dataTypes.size()); + RYU_ASSERT(columnID < dataTypes.size()); const auto valueVector = std::make_shared(dataTypes[columnID].copy(), csrState.mm); dataChunk.insert(i, valueVector); @@ -1034,7 +1034,7 @@ void CSRNodeGroup::checkpointInMemOnly(const UniqLock& lock, NodeGroupCheckpoint std::vector> dataChunksToFlush(numColumnsToCheckpoint); for (auto i = 0u; i < numColumnsToCheckpoint; i++) { const auto columnID = csrState.columnIDs[i]; - KU_ASSERT(columnID < dataTypes.size()); + RYU_ASSERT(columnID < dataTypes.size()); dataChunksToFlush[i] = std::make_unique(*state.mm, dataTypes[columnID].copy(), chunkCapacity, enableCompression, ResidencyState::IN_MEMORY); } @@ -1070,10 +1070,10 @@ void CSRNodeGroup::checkpointInMemOnly(const UniqLock& lock, NodeGroupCheckpoint auto gapSize = csrState.newHeader->getGapSize(offset); while (gapSize > 0) { // Gaps should only happen at the end of the CSR region. - KU_ASSERT((offset == numNodes - 1) || + RYU_ASSERT((offset == numNodes - 1) || (offset + 1) % StorageConfig::CSR_LEAF_REGION_SIZE == 0); const auto numGapsToAppend = std::min(gapSize, DEFAULT_VECTOR_CAPACITY); - KU_ASSERT(dummyChunk.state->getSelVector().isUnfiltered()); + RYU_ASSERT(dummyChunk.state->getSelVector().isUnfiltered()); dummyChunk.state->getSelVectorUnsafe().setSelSize(numGapsToAppend); for (auto columnID = 0u; columnID < numColumnsToCheckpoint; columnID++) { dataChunksToFlush[columnID]->append(dummyChunk.valueVectors[columnID].get(), @@ -1120,20 +1120,20 @@ void CSRNodeGroup::populateCSRLengthInMemOnly(const UniqLock& lock, offset_t num lengthAfterDelete--; } } - KU_ASSERT(lengthAfterDelete <= length); + RYU_ASSERT(lengthAfterDelete <= length); csrState.newHeader->length->setValue(lengthAfterDelete, offset); } } std::vector CSRNodeGroup::mergeRegionsToCheckpoint( const CSRNodeGroupCheckpointState& csrState, const std::vector& leafRegions) { - KU_ASSERT(std::all_of(leafRegions.begin(), leafRegions.end(), + RYU_ASSERT(std::all_of(leafRegions.begin(), leafRegions.end(), [](const CSRRegion& region) { return region.level == 0; })); - KU_ASSERT(std::is_sorted(leafRegions.begin(), leafRegions.end(), + RYU_ASSERT(std::is_sorted(leafRegions.begin(), leafRegions.end(), [](const CSRRegion& a, const CSRRegion& b) { return a.regionIdx < b.regionIdx; })); constexpr auto numLeafRegions = StorageConfig::NODE_GROUP_SIZE / StorageConfig::CSR_LEAF_REGION_SIZE; - KU_ASSERT(leafRegions.size() == numLeafRegions); + RYU_ASSERT(leafRegions.size() == numLeafRegions); std::vector mergedRegions; idx_t leafRegionIdx = 0u; while (leafRegionIdx < numLeafRegions) { @@ -1164,7 +1164,7 @@ std::vector CSRNodeGroup::mergeRegionsToCheckpoint( } static double getHighDensity(uint64_t level) { - KU_ASSERT(level <= CSRNodeGroup::DEFAULT_PACKED_CSR_INFO.calibratorTreeHeight); + RYU_ASSERT(level <= CSRNodeGroup::DEFAULT_PACKED_CSR_INFO.calibratorTreeHeight); if (level == 0) { return StorageConstants::LEAF_HIGH_CSR_DENSITY; } @@ -1186,7 +1186,7 @@ bool CSRNodeGroup::isWithinDensityBound(const InMemChunkedCSRHeader& header, for (auto regionIdx = leftRegionIdx; regionIdx <= rightRegionIdx; regionIdx++) { sizeChange += leafRegions[regionIdx].sizeChange; } - KU_ASSERT(sizeChange >= 0 || sizeChange < oldSize); + RYU_ASSERT(sizeChange >= 0 || sizeChange < oldSize); const auto newSize = oldSize + sizeChange; const auto capacity = header.getEndCSROffset(region.rightNodeOffset) - header.getStartCSROffset(region.leftNodeOffset); diff --git a/src/storage/table/dictionary_chunk.cpp b/src/storage/table/dictionary_chunk.cpp index de5b979a4c..a72a103359 100644 --- a/src/storage/table/dictionary_chunk.cpp +++ b/src/storage/table/dictionary_chunk.cpp @@ -44,7 +44,7 @@ uint64_t DictionaryChunk::getStringLength(string_index_t index) const { return 0; } if (index + 1 < offsetChunk->getNumValues()) { - KU_ASSERT(offsetChunk->getValue(index + 1) >= + RYU_ASSERT(offsetChunk->getValue(index + 1) >= offsetChunk->getValue(index)); return offsetChunk->getValue(index + 1) - offsetChunk->getValue(index); @@ -80,7 +80,7 @@ DictionaryChunk::string_index_t DictionaryChunk::appendString(std::string_view v } std::string_view DictionaryChunk::getString(string_index_t index) const { - KU_ASSERT(index < offsetChunk->getNumValues()); + RYU_ASSERT(index < offsetChunk->getNumValues()); const auto startOffset = offsetChunk->getValue(index); const auto length = getStringLength(index); return std::string_view(reinterpret_cast(stringDataChunk->getData()) + startOffset, diff --git a/src/storage/table/dictionary_column.cpp b/src/storage/table/dictionary_column.cpp index 3fa50754ef..1f8e14de77 100644 --- a/src/storage/table/dictionary_column.cpp +++ b/src/storage/table/dictionary_column.cpp @@ -111,7 +111,7 @@ void DictionaryColumn::scan(const SegmentState& offsetState, const SegmentState& auto startOffset = offsets[offsetsToScan[pos].first - firstOffsetToScan]; auto endOffset = offsets[offsetsToScan[pos].first - firstOffsetToScan + 1]; auto lengthToScan = endOffset - startOffset; - KU_ASSERT(endOffset >= startOffset); + RYU_ASSERT(endOffset >= startOffset); scanValue(dataState, startOffset, lengthToScan, result, offsetsToScan[pos].second); // For each string which has the same index in the dictionary as the one we scanned, // copy the scanned string to its position in the result vector @@ -129,7 +129,7 @@ void DictionaryColumn::scan(const SegmentState& offsetState, const SegmentState& // The offset chunk cannot have multiple offsets pointing to the same data, even if // consecutive, since that would break the mechanism for calculating the size of a // string. - KU_ASSERT(pos == offsetsToScan.size() - 1 || + RYU_ASSERT(pos == offsetsToScan.size() - 1 || offsetsToScan[pos].first != offsetsToScan[pos + 1].first); } } diff --git a/src/storage/table/in_mem_chunked_node_group_collection.cpp b/src/storage/table/in_mem_chunked_node_group_collection.cpp index fe3c1fdaa8..736a5beea4 100644 --- a/src/storage/table/in_mem_chunked_node_group_collection.cpp +++ b/src/storage/table/in_mem_chunked_node_group_collection.cpp @@ -33,9 +33,9 @@ void InMemChunkedNodeGroupCollection::append(MemoryManager& memoryManager, } void InMemChunkedNodeGroupCollection::merge(std::unique_ptr chunkedGroup) { - KU_ASSERT(chunkedGroup->getNumColumns() == types.size()); + RYU_ASSERT(chunkedGroup->getNumColumns() == types.size()); for (auto i = 0u; i < chunkedGroup->getNumColumns(); i++) { - KU_ASSERT(chunkedGroup->getColumnChunk(i).getDataType() == types[i]); + RYU_ASSERT(chunkedGroup->getColumnChunk(i).getDataType() == types[i]); } chunkedGroups.push_back(std::move(chunkedGroup)); } diff --git a/src/storage/table/in_memory_exception_chunk.cpp b/src/storage/table/in_memory_exception_chunk.cpp index 974386acf9..a00dc1fbec 100644 --- a/src/storage/table/in_memory_exception_chunk.cpp +++ b/src/storage/table/in_memory_exception_chunk.cpp @@ -71,7 +71,7 @@ void InMemoryExceptionChunk::finalize(SegmentState& state) { } } - KU_ASSERT( + RYU_ASSERT( finalizedExceptionCount <= state.metadata.compMeta.floatMetadata()->exceptionCapacity); state.metadata.compMeta.floatMetadata()->exceptionCount = finalizedExceptionCount; @@ -93,7 +93,7 @@ void InMemoryExceptionChunk::finalize(SegmentState& state) { template void InMemoryExceptionChunk::addException(EncodeException exception) { - KU_ASSERT(exceptionCount < exceptionCapacity); + RYU_ASSERT(exceptionCount < exceptionCapacity); ++exceptionCount; writeException(exception, exceptionCount - 1); emptyMask.setNull(exceptionCount - 1, false); @@ -107,14 +107,14 @@ void InMemoryExceptionChunk::removeExceptionAt(size_t exceptionIdx) { template EncodeException InMemoryExceptionChunk::getExceptionAt(size_t exceptionIdx) const { - KU_ASSERT(exceptionIdx < exceptionCount); + RYU_ASSERT(exceptionIdx < exceptionCount); auto bytesInBuffer = chunkData->getValue>(exceptionIdx); return EncodeExceptionView{reinterpret_cast(&bytesInBuffer)}.getValue(); } template void InMemoryExceptionChunk::writeException(EncodeException exception, size_t exceptionIdx) { - KU_ASSERT(exceptionIdx < exceptionCount); + RYU_ASSERT(exceptionIdx < exceptionCount); EncodeExceptionView{reinterpret_cast(chunkData->getData())}.setValue(exception, exceptionIdx); } @@ -145,7 +145,7 @@ PageCursor InMemoryExceptionChunk::getExceptionPageCursor(const ColumnChunkMe PageCursor pageBaseCursor, size_t exceptionCapacity) { const size_t numExceptionPages = EncodeException::numPagesFromExceptions(exceptionCapacity); const size_t exceptionPageOffset = metadata.getNumPages() - numExceptionPages; - KU_ASSERT(exceptionPageOffset == (page_idx_t)exceptionPageOffset); + RYU_ASSERT(exceptionPageOffset == (page_idx_t)exceptionPageOffset); return {pageBaseCursor.pageIdx + (page_idx_t)exceptionPageOffset, 0}; } diff --git a/src/storage/table/lazy_segment_scanner.cpp b/src/storage/table/lazy_segment_scanner.cpp index 8ba1787a77..5cf454a56b 100644 --- a/src/storage/table/lazy_segment_scanner.cpp +++ b/src/storage/table/lazy_segment_scanner.cpp @@ -4,7 +4,7 @@ namespace ryu::storage { void LazySegmentScanner::Iterator::advance(common::offset_t n) { segmentScanner.rangeSegments(*this, n, [this](auto& segmentData, auto, auto lengthInSegment, auto) { - KU_ASSERT(segmentData.length > offsetInSegment); + RYU_ASSERT(segmentData.length > offsetInSegment); if (segmentData.length - offsetInSegment == lengthInSegment) { ++segmentIdx; offsetInSegment = 0; @@ -23,7 +23,7 @@ void LazySegmentScanner::scanSegment(common::offset_t offsetInSegment, void LazySegmentScanner::applyCommittedUpdates(const UpdateInfo& updateInfo, const transaction::Transaction* transaction, common::offset_t startRow, common::offset_t numRows) { - KU_ASSERT(numRows == numValues); + RYU_ASSERT(numRows == numValues); rangeSegments(begin(), numRows, [&](auto& segment, common::offset_t, common::offset_t lengthInSegment, common::offset_t offsetInChunk) { diff --git a/src/storage/table/list_chunk_data.cpp b/src/storage/table/list_chunk_data.cpp index b0d27db686..2c26a90c04 100644 --- a/src/storage/table/list_chunk_data.cpp +++ b/src/storage/table/list_chunk_data.cpp @@ -31,7 +31,7 @@ ListChunkData::ListChunkData(MemoryManager& memoryManager, LogicalType dataType, ListType::getChildType(this->dataType).copy(), enableCompression, 0 /* capacity */, residencyState); checkOffsetSortedAsc = false; - KU_ASSERT(this->dataType.getPhysicalType() == PhysicalTypeID::LIST || + RYU_ASSERT(this->dataType.getPhysicalType() == PhysicalTypeID::LIST || this->dataType.getPhysicalType() == PhysicalTypeID::ARRAY); } @@ -70,7 +70,7 @@ offset_t ListChunkData::getListStartOffset(offset_t offset) const { if (numValues == 0 || (offset != numValues && nullData->isNull(offset))) { return 0; } - KU_ASSERT(offset == numValues || getListEndOffset(offset) >= getListSize(offset)); + RYU_ASSERT(offset == numValues || getListEndOffset(offset) >= getListSize(offset)); return offset == numValues ? getListEndOffset(offset - 1) : getListEndOffset(offset) - getListSize(offset); } @@ -79,7 +79,7 @@ offset_t ListChunkData::getListEndOffset(offset_t offset) const { if (numValues == 0 || nullData->isNull(offset)) { return 0; } - KU_ASSERT(offset < numValues); + RYU_ASSERT(offset < numValues); return offsetColumnChunk->getValue(offset); } @@ -87,7 +87,7 @@ list_size_t ListChunkData::getListSize(offset_t offset) const { if (numValues == 0 || nullData->isNull(offset)) { return 0; } - KU_ASSERT(offset < sizeColumnChunk->getNumValues()); + RYU_ASSERT(offset < sizeColumnChunk->getNumValues()); return sizeColumnChunk->getValue(offset); } @@ -116,7 +116,7 @@ void ListChunkData::append(const ColumnChunkData* other, offset_t startPosInOthe auto appendSize = otherListChunk.getListSize(startPosInOtherChunk + i); dataColumnChunk->append(otherListChunk.dataColumnChunk.get(), startOffset, appendSize); } - KU_ASSERT(sanityCheck()); + RYU_ASSERT(sanityCheck()); } void ListChunkData::resetToEmpty() { @@ -163,7 +163,7 @@ void ListChunkData::append(ValueVector* vector, const SelectionView& selView) { } copyListValues(vector->getValue(pos), dataVector); } - KU_ASSERT(sanityCheck()); + RYU_ASSERT(sanityCheck()); } void ListChunkData::appendNullList() { @@ -176,7 +176,7 @@ void ListChunkData::appendNullList() { void ListChunkData::scan(ValueVector& output, offset_t offset, length_t length, sel_t posInOutputVector) const { - KU_ASSERT(offset + length <= numValues); + RYU_ASSERT(offset + length <= numValues); if (nullData) { nullData->scan(output, offset, length, posInOutputVector); } @@ -205,7 +205,7 @@ void ListChunkData::scan(ValueVector& output, offset_t offset, length_t length, void ListChunkData::lookup(offset_t offsetInChunk, ValueVector& output, sel_t posInOutputVector) const { - KU_ASSERT(offsetInChunk < numValues); + RYU_ASSERT(offsetInChunk < numValues); output.setNull(posInOutputVector, nullData->isNull(offsetInChunk)); if (output.isNull(posInOutputVector)) { return; @@ -234,7 +234,7 @@ void ListChunkData::initializeScanState(SegmentState& state, const Column* colum } void ListChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity) { - KU_ASSERT(chunk->getDataType().getPhysicalType() == dataType.getPhysicalType() && + RYU_ASSERT(chunk->getDataType().getPhysicalType() == dataType.getPhysicalType() && dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && chunk->getNumValues() == dstOffsets->getNumValues()); checkOffsetSortedAsc = true; @@ -262,7 +262,7 @@ void ListChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, R setOffsetChunkValue(currentIndex, posInChunk); sizeColumnChunk->setValue(appendSize, posInChunk); } - KU_ASSERT(sanityCheck()); + RYU_ASSERT(sanityCheck()); } void ListChunkData::write(const ValueVector* vector, offset_t offsetInVector, @@ -283,12 +283,12 @@ void ListChunkData::write(const ValueVector* vector, offset_t offsetInVector, sizeColumnChunk->setValue(appendSize, offsetInChunk); setOffsetChunkValue(dataColumnChunk->getNumValues(), offsetInChunk); } - KU_ASSERT(sanityCheck()); + RYU_ASSERT(sanityCheck()); } void ListChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetInChunk, offset_t dstOffsetInChunk, offset_t numValuesToCopy) { - KU_ASSERT(srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::LIST || + RYU_ASSERT(srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::LIST || srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::ARRAY); checkOffsetSortedAsc = true; auto& srcListChunk = srcChunk->cast(); @@ -308,7 +308,7 @@ void ListChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetInC dataColumnChunk->append(srcListChunk.dataColumnChunk.get(), startOffsetInSrcChunk, appendSize); } - KU_ASSERT(sanityCheck()); + RYU_ASSERT(sanityCheck()); } void ListChunkData::copyListValues(const list_entry_t& entry, ValueVector* dataVector) { @@ -378,7 +378,7 @@ void ListChunkData::finalize() { } currentIndex++; } - KU_ASSERT(newListChunk.sanityCheck()); + RYU_ASSERT(newListChunk.sanityCheck()); // Move offsets, null, data from newListChunk to this column chunk. And release indices. resetFromOtherChunk(&newListChunk); } @@ -393,10 +393,10 @@ void ListChunkData::resetFromOtherChunk(ListChunkData* other) { } bool ListChunkData::sanityCheck() const { - KU_ASSERT(ColumnChunkData::sanityCheck()); - KU_ASSERT(sizeColumnChunk->sanityCheck()); - KU_ASSERT(offsetColumnChunk->sanityCheck()); - KU_ASSERT(getDataColumnChunk()->sanityCheck()); + RYU_ASSERT(ColumnChunkData::sanityCheck()); + RYU_ASSERT(sizeColumnChunk->sanityCheck()); + RYU_ASSERT(offsetColumnChunk->sanityCheck()); + RYU_ASSERT(getDataColumnChunk()->sanityCheck()); return sizeColumnChunk->getNumValues() == numValues; } diff --git a/src/storage/table/list_column.cpp b/src/storage/table/list_column.cpp index 26686670b3..123cdd73ec 100644 --- a/src/storage/table/list_column.cpp +++ b/src/storage/table/list_column.cpp @@ -30,7 +30,7 @@ offset_t ListOffsetSizeInfo::getListEndOffset(uint64_t pos) const { if (numTotal == 0) { return 0; } - KU_ASSERT(pos < offsetColumnChunk->getNumValues()); + RYU_ASSERT(pos < offsetColumnChunk->getNumValues()); return offsetColumnChunk->getValue(pos); } @@ -38,7 +38,7 @@ list_size_t ListOffsetSizeInfo::getListSize(uint64_t pos) const { if (numTotal == 0) { return 0; } - KU_ASSERT(pos < sizeColumnChunk->getNumValues()); + RYU_ASSERT(pos < sizeColumnChunk->getNumValues()); return sizeColumnChunk->getValue(pos); } @@ -102,7 +102,7 @@ std::unique_ptr ListColumn::flushChunkData(const ColumnChunkDat void ListColumn::scanSegment(const SegmentState& state, offset_t startOffsetInChunk, row_idx_t numValuesToScan, ValueVector* resultVector, offset_t offsetInResult) const { if (nullColumn) { - KU_ASSERT(state.nullState); + RYU_ASSERT(state.nullState); nullColumn->scanSegment(*state.nullState, startOffsetInChunk, numValuesToScan, resultVector, offsetInResult); } @@ -136,7 +136,7 @@ void ListColumn::scanSegment(const SegmentState& state, ColumnChunkData* resultC listColumnChunk.getSizeColumnChunk(), startOffsetInSegment, numValuesToScan); auto resizeNumValues = listColumnChunk.getDataColumnChunk()->getNumValues(); bool isOffsetSortedAscending = true; - KU_ASSERT(listColumnChunk.getSizeColumnChunk()->getNumValues() == + RYU_ASSERT(listColumnChunk.getSizeColumnChunk()->getNumValues() == startOffsetInResult + numValuesToScan); offset_t prevOffset = listColumnChunk.getListStartOffset(startOffsetInResult); for (auto i = startOffsetInResult; i < startOffsetInResult + numValuesToScan; i++) { @@ -153,7 +153,7 @@ void ListColumn::scanSegment(const SegmentState& state, ColumnChunkData* resultC offset_t startListOffset = listColumnChunk.getListStartOffset(startOffsetInResult); offset_t endListOffset = listColumnChunk.getListStartOffset(startOffsetInResult + numValuesToScan); - KU_ASSERT(endListOffset >= startListOffset); + RYU_ASSERT(endListOffset >= startListOffset); dataColumn->scanSegment(state.childrenStates[DATA_COLUMN_CHILD_READ_STATE_IDX], listColumnChunk.getDataColumnChunk(), startListOffset, endListOffset - startListOffset); } else { @@ -168,7 +168,7 @@ void ListColumn::scanSegment(const SegmentState& state, ColumnChunkData* resultC } listColumnChunk.resetOffset(); - KU_ASSERT(listColumnChunk.sanityCheck()); + RYU_ASSERT(listColumnChunk.sanityCheck()); } void ListColumn::lookupInternal(const SegmentState& state, offset_t nodeOffset, @@ -255,7 +255,7 @@ void ListColumn::scanFiltered(const SegmentState& state, offset_t startOffsetInS auto appendSize = listOffsetSizeInfo.getListSize(pos - offsetInResult); // If there is a selection vector for the dataVector, its selected positions are not // being updated at all for this specific segment - KU_ASSERT(!dataVector->state || dataVector->state->getSelVector().isUnfiltered()); + RYU_ASSERT(!dataVector->state || dataVector->state->getSelVector().isUnfiltered()); dataColumn->scanSegment(state.childrenStates[DATA_COLUMN_CHILD_READ_STATE_IDX], startOffsetInStorageToScan, appendSize, dataVector, offsetInDataVector); offsetInDataVector += resultVector->getValue(pos).size; @@ -379,7 +379,7 @@ std::vector> ListColumn::checkpointSegment( // Checkpoint offset data. std::vector offsetChunkCheckpointStates; - KU_ASSERT(std::is_sorted(checkpointState.segmentCheckpointStates.begin(), + RYU_ASSERT(std::is_sorted(checkpointState.segmentCheckpointStates.begin(), checkpointState.segmentCheckpointStates.end(), [](const auto& a, const auto& b) { return a.startRowInData < b.startRowInData; })); std::vector> offsetsToWrite; @@ -422,7 +422,7 @@ std::vector> ListColumn::checkpointSegment( // Checkpoint null data. Column::checkpointNullData(checkpointState, pageAllocator); - KU_ASSERT(persistentListChunk.getNullData()->getNumValues() == + RYU_ASSERT(persistentListChunk.getNullData()->getNumValues() == persistentListChunk.getOffsetColumnChunk()->getNumValues() && persistentListChunk.getNullData()->getNumValues() == persistentListChunk.getSizeColumnChunk()->getNumValues()); diff --git a/src/storage/table/node_group.cpp b/src/storage/table/node_group.cpp index 8ceb54f897..1cbe876086 100644 --- a/src/storage/table/node_group.cpp +++ b/src/storage/table/node_group.cpp @@ -24,7 +24,7 @@ namespace storage { row_idx_t NodeGroup::append(const Transaction* transaction, const std::vector& columnIDs, ChunkedNodeGroup& chunkedGroup, row_idx_t startRowIdx, row_idx_t numRowsToAppend) { - KU_ASSERT(numRowsToAppend <= chunkedGroup.getNumRows()); + RYU_ASSERT(numRowsToAppend <= chunkedGroup.getNumRows()); std::vector chunksToAppend(chunkedGroup.getNumColumns()); for (auto i = 0u; i < chunkedGroup.getNumColumns(); i++) { chunksToAppend[i] = &chunkedGroup.getColumnChunk(i); @@ -35,7 +35,7 @@ row_idx_t NodeGroup::append(const Transaction* transaction, row_idx_t NodeGroup::append(const Transaction* transaction, const std::vector& columnIDs, InMemChunkedNodeGroup& chunkedGroup, row_idx_t startRowIdx, row_idx_t numRowsToAppend) { - KU_ASSERT(numRowsToAppend <= chunkedGroup.getNumRows()); + RYU_ASSERT(numRowsToAppend <= chunkedGroup.getNumRows()); std::vector chunksToAppend(chunkedGroup.getNumColumns()); for (auto i = 0u; i < chunkedGroup.getNumColumns(); i++) { chunksToAppend[i] = &chunkedGroup.getColumnChunk(i); @@ -63,7 +63,7 @@ row_idx_t NodeGroup::append(const Transaction* transaction, numRowsBeforeAppend + numRowsAppended, ResidencyState::IN_MEMORY)); } lastChunkedGroup = chunkedGroups.getLastGroup(lock); - KU_ASSERT(StorageConfig::CHUNKED_NODE_GROUP_CAPACITY >= lastChunkedGroup->getNumRows()); + RYU_ASSERT(StorageConfig::CHUNKED_NODE_GROUP_CAPACITY >= lastChunkedGroup->getNumRows()); auto numToCopyIntoChunk = StorageConfig::CHUNKED_NODE_GROUP_CAPACITY - lastChunkedGroup->getNumRows(); const auto numToAppendInChunk = @@ -96,7 +96,7 @@ row_idx_t NodeGroup::append(const Transaction* transaction, numRowsBeforeAppend + numRowsAppended, ResidencyState::IN_MEMORY)); } lastChunkedGroup = chunkedGroups.getLastGroup(lock); - KU_ASSERT(StorageConfig::CHUNKED_NODE_GROUP_CAPACITY >= lastChunkedGroup->getNumRows()); + RYU_ASSERT(StorageConfig::CHUNKED_NODE_GROUP_CAPACITY >= lastChunkedGroup->getNumRows()); auto numToCopyIntoChunk = StorageConfig::CHUNKED_NODE_GROUP_CAPACITY - lastChunkedGroup->getNumRows(); const auto numToAppendInChunk = @@ -139,9 +139,9 @@ void NodeGroup::append(const Transaction* transaction, const std::vector chunkedGroup) { - KU_ASSERT(chunkedGroup->getNumColumns() == dataTypes.size()); + RYU_ASSERT(chunkedGroup->getNumColumns() == dataTypes.size()); for (auto i = 0u; i < chunkedGroup->getNumColumns(); i++) { - KU_ASSERT(chunkedGroup->getColumnChunk(i).getDataType().getPhysicalType() == + RYU_ASSERT(chunkedGroup->getColumnChunk(i).getDataType().getPhysicalType() == dataTypes[i].getPhysicalType()); } const auto lock = chunkedGroups.lock(); @@ -156,14 +156,14 @@ void NodeGroup::initializeScanState(const Transaction* transaction, TableScanSta static void initializeScanStateForChunkedGroup(const TableScanState& state, const ChunkedNodeGroup* chunkedGroup) { - KU_ASSERT(chunkedGroup); + RYU_ASSERT(chunkedGroup); if (chunkedGroup->getResidencyState() != ResidencyState::ON_DISK) { return; } auto& nodeGroupScanState = *state.nodeGroupScanState; for (auto i = 0u; i < state.columnIDs.size(); i++) { - KU_ASSERT(i < state.columnIDs.size()); - KU_ASSERT(i < nodeGroupScanState.chunkStates.size()); + RYU_ASSERT(i < state.columnIDs.size()); + RYU_ASSERT(i < nodeGroupScanState.chunkStates.size()); const auto columnID = state.columnIDs[i]; if (columnID == INVALID_COLUMN_ID || columnID == ROW_IDX_COLUMN_ID) { continue; @@ -216,7 +216,7 @@ NodeGroupScanResult NodeGroup::scan(const Transaction* transaction, TableScanSta // TODO(Guodong): Move the locked part of figuring out the chunked group to initScan. const auto lock = chunkedGroups.lock(); auto& nodeGroupScanState = *state.nodeGroupScanState; - KU_ASSERT(nodeGroupScanState.chunkedGroupIdx < chunkedGroups.getNumGroups(lock)); + RYU_ASSERT(nodeGroupScanState.chunkedGroupIdx < chunkedGroups.getNumGroups(lock)); const auto chunkedGroup = chunkedGroups.getGroup(lock, nodeGroupScanState.chunkedGroupIdx); if (nodeGroupScanState.nextRowToScan >= chunkedGroup->getNumRows() + chunkedGroup->getStartRowIdx()) { @@ -230,7 +230,7 @@ NodeGroupScanResult NodeGroup::scan(const Transaction* transaction, TableScanSta } const auto& chunkedGroupToScan = *chunkedGroups.getGroup(lock, nodeGroupScanState.chunkedGroupIdx); - KU_ASSERT(nodeGroupScanState.nextRowToScan >= chunkedGroupToScan.getStartRowIdx()); + RYU_ASSERT(nodeGroupScanState.nextRowToScan >= chunkedGroupToScan.getStartRowIdx()); const auto rowIdxInChunkToScan = nodeGroupScanState.nextRowToScan - chunkedGroupToScan.getStartRowIdx(); const auto numRowsToScan = @@ -263,7 +263,7 @@ NodeGroupScanResult NodeGroup::scan(Transaction* transaction, TableScanState& st } } if (state.outputVectors.size() == 0) { - KU_ASSERT(scanInternal(chunkedGroups.lock(), transaction, state, startOffsetInGroup, + RYU_ASSERT(scanInternal(chunkedGroups.lock(), transaction, state, startOffsetInGroup, numRowsToScan) == NodeGroupScanResult(startOffsetInGroup, numRowsToScan)); return NodeGroupScanResult{startOffsetInGroup, numRowsToScan}; } @@ -274,7 +274,7 @@ NodeGroupScanResult NodeGroup::scan(Transaction* transaction, TableScanState& st NodeGroupScanResult NodeGroup::scanInternal(const UniqLock& lock, Transaction* transaction, TableScanState& state, offset_t startOffsetInGroup, offset_t numRowsToScan) const { // Only meant for scanning once - KU_ASSERT(numRowsToScan <= DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(numRowsToScan <= DEFAULT_VECTOR_CAPACITY); auto startRowIdxInGroup = getStartRowIdxInGroupNoLock(); if (startOffsetInGroup < startRowIdxInGroup) { @@ -287,7 +287,7 @@ NodeGroupScanResult NodeGroup::scanInternal(const UniqLock& lock, Transaction* t nodeGroupScanState.nextRowToScan = startOffsetInGroup; auto [newChunkedGroupIdx, _] = findChunkedGroupIdxFromRowIdxNoLock(startOffsetInGroup); - KU_ASSERT(newChunkedGroupIdx != INVALID_CHUNKED_GROUP_IDX); + RYU_ASSERT(newChunkedGroupIdx != INVALID_CHUNKED_GROUP_IDX); const auto* chunkedGroupToScan = chunkedGroups.getGroup(lock, newChunkedGroupIdx); if (newChunkedGroupIdx != nodeGroupScanState.chunkedGroupIdx) { @@ -302,7 +302,7 @@ NodeGroupScanResult NodeGroup::scanInternal(const UniqLock& lock, Transaction* t (startOffsetInGroup + numRowsScanned) - chunkedGroupToScan->getStartRowIdx(); uint64_t numRowsToScanInChunk = std::min(numRowsToScan - numRowsScanned, chunkedGroupToScan->getNumRows() - rowIdxInChunkToScan); - KU_ASSERT(startOffsetInGroup + numRowsToScanInChunk <= numRows); + RYU_ASSERT(startOffsetInGroup + numRowsToScanInChunk <= numRows); chunkedGroupToScan->scan(transaction, state, nodeGroupScanState, rowIdxInChunkToScan, numRowsToScanInChunk); numRowsScanned += numRowsToScanInChunk; @@ -315,10 +315,10 @@ bool NodeGroup::lookupNoLock(const Transaction* transaction, const TableScanStat sel_t posInSel) const { auto& nodeGroupScanState = *state.nodeGroupScanState; const auto pos = state.rowIdxVector->state->getSelVector().getSelectedPositions()[posInSel]; - KU_ASSERT(!state.rowIdxVector->isNull(pos)); + RYU_ASSERT(!state.rowIdxVector->isNull(pos)); const auto rowIdx = state.rowIdxVector->getValue(pos); const ChunkedNodeGroup* chunkedGroupToScan = findChunkedGroupFromRowIdxNoLock(rowIdx); - KU_ASSERT(chunkedGroupToScan); + RYU_ASSERT(chunkedGroupToScan); const auto rowIdxInChunkedGroup = rowIdx - chunkedGroupToScan->getStartRowIdx(); return chunkedGroupToScan->lookup(transaction, state, nodeGroupScanState, rowIdxInChunkedGroup, posInSel); @@ -330,10 +330,10 @@ bool NodeGroup::lookupMultiple(const UniqLock& lock, const Transaction* transact for (auto i = 0u; i < state.rowIdxVector->state->getSelVector().getSelSize(); i++) { auto& nodeGroupScanState = *state.nodeGroupScanState; const auto pos = state.rowIdxVector->state->getSelVector().getSelectedPositions()[i]; - KU_ASSERT(!state.rowIdxVector->isNull(pos)); + RYU_ASSERT(!state.rowIdxVector->isNull(pos)); const auto rowIdx = state.rowIdxVector->getValue(pos); const ChunkedNodeGroup* chunkedGroupToScan = findChunkedGroupFromRowIdx(lock, rowIdx); - KU_ASSERT(chunkedGroupToScan); + RYU_ASSERT(chunkedGroupToScan); const auto rowIdxInChunkedGroup = rowIdx - chunkedGroupToScan->getStartRowIdx(); numTuplesFound += chunkedGroupToScan->lookup(transaction, state, nodeGroupScanState, rowIdxInChunkedGroup, i); @@ -355,13 +355,13 @@ bool NodeGroup::lookupMultiple(const Transaction* transaction, const TableScanSt // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const. void NodeGroup::update(const Transaction* transaction, row_idx_t rowIdxInGroup, column_id_t columnID, const ValueVector& propertyVector) { - KU_ASSERT(propertyVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(propertyVector.state->getSelVector().getSelSize() == 1); ChunkedNodeGroup* chunkedGroupToUpdate = nullptr; { const auto lock = chunkedGroups.lock(); chunkedGroupToUpdate = findChunkedGroupFromRowIdx(lock, rowIdxInGroup); } - KU_ASSERT(chunkedGroupToUpdate); + RYU_ASSERT(chunkedGroupToUpdate); const auto rowIdxInChunkedGroup = rowIdxInGroup - chunkedGroupToUpdate->getStartRowIdx(); chunkedGroupToUpdate->update(transaction, rowIdxInChunkedGroup, columnID, propertyVector); } @@ -373,7 +373,7 @@ bool NodeGroup::delete_(const Transaction* transaction, row_idx_t rowIdxInGroup) const auto lock = chunkedGroups.lock(); groupToDelete = findChunkedGroupFromRowIdx(lock, rowIdxInGroup); } - KU_ASSERT(groupToDelete); + RYU_ASSERT(groupToDelete); const auto rowIdxInChunkedGroup = rowIdxInGroup - groupToDelete->getStartRowIdx(); return groupToDelete->delete_(transaction, rowIdxInChunkedGroup); } @@ -418,7 +418,7 @@ void NodeGroup::reclaimStorage(PageAllocator& pageAllocator, const UniqLock& loc void NodeGroup::checkpoint(MemoryManager& memoryManager, NodeGroupCheckpointState& state) { const auto lock = chunkedGroups.lock(); - KU_ASSERT(chunkedGroups.getNumGroups(lock) >= 1); + RYU_ASSERT(chunkedGroups.getNumGroups(lock) >= 1); const auto firstGroup = chunkedGroups.getFirstGroup(lock); const auto hasPersistentData = firstGroup->getResidencyState() == ResidencyState::ON_DISK; // Re-populate version info here first. @@ -447,7 +447,7 @@ void NodeGroup::checkpointDataTypesNoLock(const NodeGroupCheckpointState& state) std::vector checkpointedTypes; for (auto i = 0u; i < state.columnIDs.size(); i++) { auto columnID = state.columnIDs[i]; - KU_ASSERT(columnID < dataTypes.size()); + RYU_ASSERT(columnID < dataTypes.size()); checkpointedTypes.push_back(dataTypes[columnID].copy()); } dataTypes = std::move(checkpointedTypes); @@ -466,7 +466,7 @@ void NodeGroup::scanCommittedUpdatesForColumn( chunkedGroup->getColumnChunk(columnID).scanCommitted( &DUMMY_CHECKPOINT_TRANSACTION, chunkState, updateSegmentScanner); } - KU_ASSERT(updateSegmentScanner.getNumValues() == numPersistentRows); + RYU_ASSERT(updateSegmentScanner.getNumValues() == numPersistentRows); updateSegmentScanner.rangeSegments(updateSegmentScanner.begin(), numPersistentRows, [&chunkCheckpointStates](auto& segment, auto, auto segmentLength, auto offsetInChunk) { if (segment.segmentData) { @@ -491,7 +491,7 @@ std::unique_ptr NodeGroup::checkpointInMemAndOnDisk(MemoryMana for (auto i = 0u; i < state.columnIDs.size(); i++) { const auto columnID = state.columnIDs[i]; // if has persistent data, scan updates from persistent chunked group; - KU_ASSERT(firstGroup && firstGroup->getResidencyState() == ResidencyState::ON_DISK); + RYU_ASSERT(firstGroup && firstGroup->getResidencyState() == ResidencyState::ON_DISK); const auto columnHasUpdates = firstGroup->hasAnyUpdates(&DUMMY_CHECKPOINT_TRANSACTION, columnID, 0, firstGroup->getNumRows()); if (numInsertedRows == 0 && !columnHasUpdates) { @@ -511,7 +511,7 @@ std::unique_ptr NodeGroup::checkpointInMemAndOnDisk(MemoryMana } auto checkpointedChunkedGroup = std::make_unique(*chunkedGroups.getGroup(lock, 0), state.columnIDs); - KU_ASSERT(checkpointedChunkedGroup->getResidencyState() == ResidencyState::ON_DISK); + RYU_ASSERT(checkpointedChunkedGroup->getResidencyState() == ResidencyState::ON_DISK); checkpointedChunkedGroup->resetNumRowsFromChunks(); checkpointedChunkedGroup->resetVersionAndUpdateInfo(); // The first chunked group is the only persistent one @@ -570,7 +570,7 @@ void NodeGroup::serialize(Serializer& serializer) { serializer.writeDebuggingInfo("format"); serializer.write(format); const auto lock = chunkedGroups.lock(); - KU_ASSERT(chunkedGroups.getNumGroups(lock) == 1); + RYU_ASSERT(chunkedGroups.getNumGroups(lock) == 1); const auto chunkedGroup = chunkedGroups.getFirstGroup(lock); serializer.writeDebuggingInfo("has_checkpointed_data"); serializer.write(chunkedGroup->getResidencyState() == ResidencyState::ON_DISK); @@ -621,7 +621,7 @@ std::unique_ptr NodeGroup::deserialize(MemoryManager& mm, Deserialize } } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -694,7 +694,7 @@ std::unique_ptr NodeGroup::scanAllInsertedAndVersions( } for (auto i = 0u; i < columnIDs.size(); i++) { if (columnIDs[i] != 0) { - KU_ASSERT(numResidentRows == mergedInMemGroup->getColumnChunk(i).getNumValues()); + RYU_ASSERT(numResidentRows == mergedInMemGroup->getColumnChunk(i).getNumValues()); } } mergedInMemGroup->setNumRows(numResidentRows); @@ -737,20 +737,20 @@ bool NodeGroup::isVisibleNoLock(const Transaction* transaction, row_idx_t rowIdx bool NodeGroup::isDeleted(const Transaction* transaction, offset_t offsetInGroup) const { const auto lock = chunkedGroups.lock(); const auto* chunkedGroup = findChunkedGroupFromRowIdx(lock, offsetInGroup); - KU_ASSERT(chunkedGroup); + RYU_ASSERT(chunkedGroup); return chunkedGroup->isDeleted(transaction, offsetInGroup - chunkedGroup->getStartRowIdx()); } bool NodeGroup::isInserted(const Transaction* transaction, offset_t offsetInGroup) const { const auto lock = chunkedGroups.lock(); const auto* chunkedGroup = findChunkedGroupFromRowIdx(lock, offsetInGroup); - KU_ASSERT(chunkedGroup); + RYU_ASSERT(chunkedGroup); return chunkedGroup->isInserted(transaction, offsetInGroup - chunkedGroup->getStartRowIdx()); } void NodeGroup::applyFuncToChunkedGroups(version_record_handler_op_t func, row_idx_t startRow, row_idx_t numRows, transaction_t commitTS) const { - KU_ASSERT(startRow <= getNumRows()); + RYU_ASSERT(startRow <= getNumRows()); auto lock = chunkedGroups.lock(); const auto [chunkedGroupIdx, startRowInChunkedGroup] = diff --git a/src/storage/table/node_group_collection.cpp b/src/storage/table/node_group_collection.cpp index 8d730c497c..23dfa357b9 100644 --- a/src/storage/table/node_group_collection.cpp +++ b/src/storage/table/node_group_collection.cpp @@ -27,9 +27,9 @@ NodeGroupCollection::NodeGroupCollection(MemoryManager& mm, const std::vector& vectors) { const auto numRowsToAppend = vectors[0]->state->getSelVector().getSelSize(); - KU_ASSERT(numRowsToAppend == vectors[0]->state->getSelVector().getSelSize()); + RYU_ASSERT(numRowsToAppend == vectors[0]->state->getSelVector().getSelSize()); for (auto i = 1u; i < vectors.size(); i++) { - KU_ASSERT(vectors[i]->state->getSelVector().getSelSize() == numRowsToAppend); + RYU_ASSERT(vectors[i]->state->getSelVector().getSelSize() == numRowsToAppend); } const auto lock = nodeGroups.lock(); if (nodeGroups.isEmpty(lock)) { @@ -68,7 +68,7 @@ void NodeGroupCollection::append(const Transaction* transaction, void NodeGroupCollection::append(const Transaction* transaction, const std::vector& columnIDs, const NodeGroup& nodeGroup) { - KU_ASSERT(nodeGroup.getDataTypes().size() == columnIDs.size()); + RYU_ASSERT(nodeGroup.getDataTypes().size() == columnIDs.size()); const auto lock = nodeGroups.lock(); if (nodeGroups.isEmpty(lock)) { auto newGroup = @@ -149,7 +149,7 @@ std::pair NodeGroupCollection::appendToLastNodeGroupAndFlush auto groupToMerge = std::make_unique(mm, *flushedGroup, lastNodeGroup->getDataTypes(), columnIDs); - KU_ASSERT(lastNodeGroup->getNumChunkedGroups() == 0); + RYU_ASSERT(lastNodeGroup->getNumChunkedGroups() == 0); lastNodeGroup->merge(transaction, std::move(groupToMerge)); } return {startOffset, numToAppend}; @@ -174,13 +174,13 @@ NodeGroup* NodeGroupCollection::getOrCreateNodeGroup(const Transaction* transact // needed pushInsertInfo(transaction, nodeGroups.getLastGroup(lock), 0); } - KU_ASSERT(groupIdx < nodeGroups.getNumGroups(lock)); + RYU_ASSERT(groupIdx < nodeGroups.getNumGroups(lock)); return nodeGroups.getGroup(lock, groupIdx); } void NodeGroupCollection::addColumn(TableAddColumnState& addColumnState, PageAllocator* pageAllocator) { - KU_ASSERT((pageAllocator == nullptr) == (residency == ResidencyState::IN_MEMORY)); + RYU_ASSERT((pageAllocator == nullptr) == (residency == ResidencyState::IN_MEMORY)); const auto lock = nodeGroups.lock(); auto& newColumnStats = stats.addNewColumn(addColumnState.propertyDefinition.getType()); for (const auto& nodeGroup : nodeGroups.getAllGroups(lock)) { @@ -201,7 +201,7 @@ uint64_t NodeGroupCollection::getEstimatedMemoryUsage() const { // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const. void NodeGroupCollection::checkpoint(MemoryManager& memoryManager, NodeGroupCheckpointState& state) { - KU_ASSERT(residency == ResidencyState::ON_DISK); + RYU_ASSERT(residency == ResidencyState::ON_DISK); const auto lock = nodeGroups.lock(); for (const auto& nodeGroup : nodeGroups.getAllGroups(lock)) { nodeGroup->checkpoint(memoryManager, state); @@ -228,7 +228,7 @@ void NodeGroupCollection::rollbackInsert(row_idx_t numRows_, bool updateNumRows) nodeGroups.removeTrailingGroups(lock, numGroupsToRemove); if (updateNumRows) { - KU_ASSERT(numRows_ <= numTotalRows); + RYU_ASSERT(numRows_ <= numTotalRows); numTotalRows -= numRows_; } } @@ -261,7 +261,7 @@ void NodeGroupCollection::serialize(Serializer& ser) { void NodeGroupCollection::deserialize(Deserializer& deSer, MemoryManager& memoryManager) { std::string key; deSer.validateDebuggingInfo(key, "node_groups"); - KU_ASSERT(residency == ResidencyState::ON_DISK); + RYU_ASSERT(residency == ResidencyState::ON_DISK); nodeGroups.deserializeGroups(memoryManager, deSer, types); deSer.validateDebuggingInfo(key, "stats"); stats.deserialize(deSer); diff --git a/src/storage/table/node_table.cpp b/src/storage/table/node_table.cpp index db5e683742..64259045d3 100644 --- a/src/storage/table/node_table.cpp +++ b/src/storage/table/node_table.cpp @@ -36,7 +36,7 @@ void NodeTableVersionRecordHandler::rollbackInsert(main::ClientContext* context, // the only case where a node group would be empty (and potentially removed before) is if an // exception occurred while adding its first chunk - KU_ASSERT(nodeGroupIdx < table->getNumNodeGroups() || startRow == 0); + RYU_ASSERT(nodeGroupIdx < table->getNumNodeGroups() || startRow == 0); if (nodeGroupIdx < table->getNumNodeGroups()) { VersionRecordHandler::rollbackInsert(context, nodeGroupIdx, startRow, numRows); auto* nodeGroup = table->getNodeGroupNoLock(nodeGroupIdx); @@ -48,7 +48,7 @@ void NodeTableVersionRecordHandler::rollbackInsert(main::ClientContext* context, NodeGroupScanResult NodeTableScanState::scanNext(Transaction* transaction, offset_t startOffset, offset_t numNodes) { - KU_ASSERT(columns.size() == outputVectors.size()); + RYU_ASSERT(columns.size() == outputVectors.size()); if (source == TableScanSource::NONE) { return NODE_GROUP_SCAN_EMPTY_RESULT; } @@ -160,7 +160,7 @@ bool RollbackPKDeleter::processScanOutput(main::ClientContext* context, if (scanResult == NODE_GROUP_SCAN_EMPTY_RESULT) { return false; } - KU_ASSERT(scannedVectors.size() == 1); + RYU_ASSERT(scannedVectors.size() == 1); auto& scannedVector = *scannedVectors[0]; auto& pkIndex = index->cast(); const auto rollbackFunc = [&](T) { @@ -177,7 +177,7 @@ bool RollbackPKDeleter::processScanOutput(main::ClientContext* context, } }; TypeUtils::visit(scannedVector.dataType.getPhysicalType(), std::cref(rollbackFunc), - [](T) { KU_UNREACHABLE; }); + [](T) { RYU_UNREACHABLE; }); return true; } } // namespace @@ -201,7 +201,7 @@ bool NodeTableScanState::scanNext(Transaction* transaction) { if (source == TableScanSource::NONE) { return false; } - KU_ASSERT(columns.size() == outputVectors.size()); + RYU_ASSERT(columns.size() == outputVectors.size()); const NodeGroupScanResult scanResult = nodeGroup->scan(transaction, *this); if (scanResult == NODE_GROUP_SCAN_EMPTY_RESULT) { return false; @@ -236,7 +236,7 @@ NodeTable::NodeTable(const StorageManager* storageManager, dataFH, mm, shadowFile, enableCompression); } auto& pkDefinition = nodeTableEntry->getPrimaryKeyDefinition(); - KU_ASSERT(pkColumnID != INVALID_COLUMN_ID); + RYU_ASSERT(pkColumnID != INVALID_COLUMN_ID); auto hashIndexType = PrimaryKeyIndex::getIndexType(); IndexInfo indexInfo{PrimaryKeyIndex::DEFAULT_NAME, hashIndexType.typeName, tableID, {pkColumnID}, {pkDefinition.getType().getPhysicalType()}, @@ -269,16 +269,16 @@ void NodeTable::initScanState(Transaction* transaction, TableScanState& scanStat } break; case TableScanSource::UNCOMMITTED: { const auto localTable = transaction->getLocalStorage()->getLocalTable(tableID); - KU_ASSERT(localTable); + RYU_ASSERT(localTable); const auto& localNodeTable = localTable->cast(); nodeGroup = localNodeTable.getNodeGroup(nodeScanState.nodeGroupIdx); - KU_ASSERT(nodeGroup); + RYU_ASSERT(nodeGroup); } break; case TableScanSource::NONE: { // DO NOTHING. } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } nodeScanState.initState(transaction, nodeGroup); @@ -304,7 +304,7 @@ bool NodeTable::scanInternal(Transaction* transaction, TableScanState& scanState template bool NodeTable::lookup(const Transaction* transaction, const TableScanState& scanState) const { - KU_ASSERT(scanState.nodeIDVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(scanState.nodeIDVector->state->getSelVector().getSelSize() == 1); const auto nodeIDPos = scanState.nodeIDVector->state->getSelVector()[0]; if (scanState.nodeIDVector->isNull(nodeIDPos)) { return false; @@ -375,7 +375,7 @@ template bool NodeTable::lookupMultiple(Transaction* transaction, offset_t NodeTable::validateUniquenessConstraint(const Transaction* transaction, const std::vector& propertyVectors) const { const auto pkVector = propertyVectors[pkColumnID]; - KU_ASSERT(pkVector->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(pkVector->state->getSelVector().getSelSize() == 1); const auto pkVectorPos = pkVector->state->getSelVector()[0]; if (offset_t offset = INVALID_OFFSET; getPKIndex()->lookup(transaction, propertyVectors[pkColumnID], pkVectorPos, offset, @@ -392,7 +392,7 @@ offset_t NodeTable::validateUniquenessConstraint(const Transaction* transaction, void NodeTable::validatePkNotExists(const Transaction* transaction, ValueVector* pkVector) const { offset_t dummyOffset = INVALID_OFFSET; auto& selVector = pkVector->state->getSelVector(); - KU_ASSERT(selVector.getSelSize() == 1); + RYU_ASSERT(selVector.getSelSize() == 1); if (pkVector->isNull(selVector[0])) { throw RuntimeException(ExceptionMessage::nullPKException()); } @@ -419,8 +419,8 @@ void NodeTable::initInsertState(main::ClientContext* context, TableInsertState& void NodeTable::insert(Transaction* transaction, TableInsertState& insertState) { const auto& nodeInsertState = insertState.cast(); auto& nodeIDSelVector = nodeInsertState.nodeIDVector.state->getSelVector(); - KU_ASSERT(nodeInsertState.propertyVectors[0]->state->getSelVector().getSelSize() == 1); - KU_ASSERT(nodeIDSelVector.getSelSize() == 1); + RYU_ASSERT(nodeInsertState.propertyVectors[0]->state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeIDSelVector.getSelSize() == 1); if (nodeInsertState.nodeIDVector.isNull(nodeIDSelVector[0])) { return; } @@ -437,7 +437,7 @@ void NodeTable::insert(Transaction* transaction, TableInsertState& insertState) *nodeInsertState.indexInsertStates[i]); } if (insertState.logToWAL && transaction->shouldLogToWAL()) { - KU_ASSERT(transaction->isWriteTransaction()); + RYU_ASSERT(transaction->isWriteTransaction()); auto& wal = transaction->getLocalWAL(); wal.logTableInsertion(tableID, TableType::NODE, nodeInsertState.nodeIDVector.state->getSelVector().getSelSize(), @@ -467,7 +467,7 @@ void NodeTable::update(Transaction* transaction, TableUpdateState& updateState) // NOTE: We assume all inputs are flattened now. This is to simplify the implementation. // We should optimize this to take unflattened input later. auto& nodeUpdateState = updateState.constCast(); - KU_ASSERT(nodeUpdateState.nodeIDVector.state->getSelVector().getSelSize() == 1 && + RYU_ASSERT(nodeUpdateState.nodeIDVector.state->getSelVector().getSelSize() == 1 && nodeUpdateState.propertyVector.state->getSelVector().getSelSize() == 1); const auto pos = nodeUpdateState.nodeIDVector.state->getSelVector()[0]; if (nodeUpdateState.nodeIDVector.isNull(pos)) { @@ -488,7 +488,7 @@ void NodeTable::update(Transaction* transaction, TableUpdateState& updateState) } if (transaction->isUnCommitted(tableID, nodeOffset)) { const auto localTable = transaction->getLocalStorage()->getLocalTable(tableID); - KU_ASSERT(localTable); + RYU_ASSERT(localTable); localTable->update(&DUMMY_TRANSACTION, updateState); } else { const auto nodeGroupIdx = StorageUtils::getNodeGroupIdx(nodeOffset); @@ -499,7 +499,7 @@ void NodeTable::update(Transaction* transaction, TableUpdateState& updateState) nodeUpdateState.propertyVector); } if (updateState.logToWAL && transaction->shouldLogToWAL()) { - KU_ASSERT(transaction->isWriteTransaction()); + RYU_ASSERT(transaction->isWriteTransaction()); auto& wal = transaction->getLocalWAL(); wal.logNodeUpdate(tableID, nodeUpdateState.columnID, nodeOffset, &nodeUpdateState.propertyVector); @@ -509,7 +509,7 @@ void NodeTable::update(Transaction* transaction, TableUpdateState& updateState) bool NodeTable::delete_(Transaction* transaction, TableDeleteState& deleteState) { const auto& nodeDeleteState = ku_dynamic_cast(deleteState); - KU_ASSERT(nodeDeleteState.nodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(nodeDeleteState.nodeIDVector.state->getSelVector().getSelSize() == 1); const auto pos = nodeDeleteState.nodeIDVector.state->getSelVector()[0]; if (nodeDeleteState.nodeIDVector.isNull(pos)) { return false; @@ -537,7 +537,7 @@ bool NodeTable::delete_(Transaction* transaction, TableDeleteState& deleteState) if (isDeleted) { hasChanges = true; if (deleteState.logToWAL && transaction->shouldLogToWAL()) { - KU_ASSERT(transaction->isWriteTransaction()); + RYU_ASSERT(transaction->isWriteTransaction()); auto& wal = transaction->getLocalWAL(); wal.logNodeDeletion(tableID, nodeOffset, &nodeDeleteState.pkVector); } @@ -572,7 +572,7 @@ std::pair NodeTable::appendToLastNodeGroup(Transaction* tran DataChunk NodeTable::constructDataChunkForColumns(const std::vector& columnIDs) const { std::vector types; for (const auto& columnID : columnIDs) { - KU_ASSERT(columnID < columns.size()); + RYU_ASSERT(columnID < columns.size()); types.push_back(columns[columnID]->getDataType().copy()); } return constructDataChunk(memoryManager, std::move(types)); @@ -611,7 +611,7 @@ void NodeTable::commit(main::ClientContext* context, TableCatalogEntry* tableEnt nodeOffset - StorageUtils::getStartOffsetOfNodeGroup(nodeGroupIdx); [[maybe_unused]] const bool isDeleted = nodeGroups->getNodeGroup(nodeGroupIdx)->delete_(transaction, rowIdxInGroup); - KU_ASSERT(isDeleted); + RYU_ASSERT(isDeleted); if (transaction->shouldAppendToUndoBuffer()) { transaction->pushDeleteInfo(nodeGroupIdx, rowIdxInGroup, 1, &versionRecordHandler); @@ -756,7 +756,7 @@ void NodeTable::scanIndexColumns(main::ClientContext* context, IndexScanHelper& // an exception that is thrown before any chunked groups could be appended to the node group if (scanState->nodeGroup->getNumChunkedGroups() > 0) { scanState->nodeGroupIdx = nodeGroupToScan; - KU_ASSERT(scanState->nodeGroup); + RYU_ASSERT(scanState->nodeGroup); scanState->nodeGroup->initializeScanState(transaction::Transaction::Get(*context), *scanState); while (true) { @@ -779,10 +779,10 @@ void NodeTable::addIndex(std::unique_ptr index) { } void NodeTable::dropIndex(const std::string& name) { - KU_ASSERT(getIndex(name) != nullptr); + RYU_ASSERT(getIndex(name) != nullptr); for (auto it = indexes.begin(); it != indexes.end(); ++it) { if (StringUtils::caseInsensitiveEquals(it->getName(), name)) { - KU_ASSERT(it->isLoaded()); + RYU_ASSERT(it->isLoaded()); indexes.erase(it); hasChanges = true; return; diff --git a/src/storage/table/rel_table.cpp b/src/storage/table/rel_table.cpp index b854a824e3..2c51d441a6 100644 --- a/src/storage/table/rel_table.cpp +++ b/src/storage/table/rel_table.cpp @@ -91,7 +91,7 @@ void RelTableScanState::initStateForCommitted(const Transaction* transaction) { } void RelTableScanState::initStateForUncommitted() { - KU_ASSERT(localTableScanState); + RYU_ASSERT(localTableScanState); source = TableScanSource::UNCOMMITTED; currBoundNodeIdx = 0; localTableScanState->localRelTable->initializeScan(*this); @@ -113,14 +113,14 @@ bool RelTableScanState::scanNext(Transaction* transaction) { return true; } case TableScanSource::UNCOMMITTED: { - KU_ASSERT(localTableScanState && localTableScanState->localRelTable); + RYU_ASSERT(localTableScanState && localTableScanState->localRelTable); return localTableScanState->localRelTable->scan(transaction, *this); } case TableScanSource::NONE: { return false; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -179,7 +179,7 @@ static void throwRelMultiplicityConstraintError(const std::string& tableName, of void RelTable::checkRelMultiplicityConstraint(Transaction* transaction, const TableInsertState& state) const { const auto& insertState = state.constCast(); - KU_ASSERT(insertState.srcNodeIDVector.state->getSelVector().getSelSize() == 1 && + RYU_ASSERT(insertState.srcNodeIDVector.state->getSelVector().getSelSize() == 1 && insertState.dstNodeIDVector.state->getSelVector().getSelSize() == 1); for (auto& relData : directedRelData) { @@ -194,18 +194,18 @@ void RelTable::checkRelMultiplicityConstraint(Transaction* transaction, void RelTable::insert(Transaction* transaction, TableInsertState& insertState) { checkRelMultiplicityConstraint(transaction, insertState); - KU_ASSERT(transaction->getLocalStorage()); + RYU_ASSERT(transaction->getLocalStorage()); const auto localTable = transaction->getLocalStorage()->getOrCreateLocalTable(*this); localTable->insert(transaction, insertState); if (insertState.logToWAL && transaction->shouldLogToWAL()) { - KU_ASSERT(transaction->isWriteTransaction()); + RYU_ASSERT(transaction->isWriteTransaction()); const auto& relInsertState = insertState.cast(); std::vector vectorsToLog; vectorsToLog.push_back(&relInsertState.srcNodeIDVector); vectorsToLog.push_back(&relInsertState.dstNodeIDVector); vectorsToLog.insert(vectorsToLog.end(), relInsertState.propertyVectors.begin(), relInsertState.propertyVectors.end()); - KU_ASSERT(relInsertState.srcNodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(relInsertState.srcNodeIDVector.state->getSelVector().getSelSize() == 1); auto& wal = transaction->getLocalWAL(); wal.logTableInsertion(tableID, TableType::REL, relInsertState.srcNodeIDVector.state->getSelVector().getSelSize(), vectorsToLog); @@ -215,12 +215,12 @@ void RelTable::insert(Transaction* transaction, TableInsertState& insertState) { void RelTable::update(Transaction* transaction, TableUpdateState& updateState) { const auto& relUpdateState = updateState.cast(); - KU_ASSERT(relUpdateState.relIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(relUpdateState.relIDVector.state->getSelVector().getSelSize() == 1); const auto relIDPos = relUpdateState.relIDVector.state->getSelVector()[0]; if (const auto relOffset = relUpdateState.relIDVector.readNodeOffset(relIDPos); relOffset >= StorageConstants::MAX_NUM_ROWS_IN_TABLE) { const auto localTable = transaction->getLocalStorage()->getLocalTable(tableID); - KU_ASSERT(localTable); + RYU_ASSERT(localTable); localTable->update(&DUMMY_TRANSACTION, updateState); } else { for (auto& relData : directedRelData) { @@ -230,7 +230,7 @@ void RelTable::update(Transaction* transaction, TableUpdateState& updateState) { } } if (updateState.logToWAL && transaction->shouldLogToWAL()) { - KU_ASSERT(transaction->isWriteTransaction()); + RYU_ASSERT(transaction->isWriteTransaction()); auto& wal = transaction->getLocalWAL(); wal.logRelUpdate(tableID, relUpdateState.columnID, &relUpdateState.srcNodeIDVector, &relUpdateState.dstNodeIDVector, &relUpdateState.relIDVector, @@ -241,13 +241,13 @@ void RelTable::update(Transaction* transaction, TableUpdateState& updateState) { bool RelTable::delete_(Transaction* transaction, TableDeleteState& deleteState) { const auto& relDeleteState = deleteState.cast(); - KU_ASSERT(relDeleteState.relIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(relDeleteState.relIDVector.state->getSelVector().getSelSize() == 1); const auto relIDPos = relDeleteState.relIDVector.state->getSelVector()[0]; bool isDeleted = false; if (const auto relOffset = relDeleteState.relIDVector.readNodeOffset(relIDPos); relOffset >= StorageConstants::MAX_NUM_ROWS_IN_TABLE) { const auto localTable = transaction->getLocalStorage()->getLocalTable(tableID); - KU_ASSERT(localTable); + RYU_ASSERT(localTable); isDeleted = localTable->delete_(transaction, deleteState); } else { for (auto& relData : directedRelData) { @@ -262,7 +262,7 @@ bool RelTable::delete_(Transaction* transaction, TableDeleteState& deleteState) if (isDeleted) { hasChanges = true; if (deleteState.logToWAL && transaction->shouldLogToWAL()) { - KU_ASSERT(transaction->isWriteTransaction()); + RYU_ASSERT(transaction->isWriteTransaction()); auto& wal = transaction->getLocalWAL(); wal.logRelDelete(tableID, &relDeleteState.srcNodeIDVector, &relDeleteState.dstNodeIDVector, &relDeleteState.relIDVector); @@ -278,7 +278,7 @@ void RelTable::detachDelete(Transaction* transaction, RelTableDeleteState* delet stringFormat("Cannot delete edges of direction {} from table {} as they do not exist.", RelDirectionUtils::relDirectionToString(direction), tableName)); } - KU_ASSERT(deleteState->srcNodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(deleteState->srcNodeIDVector.state->getSelVector().getSelSize() == 1); const auto tableData = getDirectedTableData(direction); const auto reverseTableData = directedRelData.size() == NUM_REL_DIRECTIONS ? @@ -294,7 +294,7 @@ void RelTable::detachDelete(Transaction* transaction, RelTableDeleteState* delet detachDeleteForCSRRels(transaction, tableData, reverseTableData, relReadState.get(), deleteState); if (deleteState->logToWAL && transaction->shouldLogToWAL()) { - KU_ASSERT(transaction->isWriteTransaction()); + RYU_ASSERT(transaction->isWriteTransaction()); auto& wal = transaction->getLocalWAL(); wal.logRelDetachDelete(tableID, direction, &deleteState->srcNodeIDVector); } @@ -354,7 +354,7 @@ void RelTable::detachDeleteForCSRRels(Transaction* transaction, RelTableData* ta const auto relIDPos = deleteState->relIDVector.state->getSelVector()[0]; const auto relOffset = deleteState->relIDVector.readNodeOffset(relIDPos); if (relOffset >= StorageConstants::MAX_NUM_ROWS_IN_TABLE) { - KU_ASSERT(localTable); + RYU_ASSERT(localTable); localTable->delete_(transaction, *deleteState); continue; } @@ -363,7 +363,7 @@ void RelTable::detachDeleteForCSRRels(Transaction* transaction, RelTableData* ta if (reverseTableData) { [[maybe_unused]] const auto reverseDeleted = reverseTableData->delete_(transaction, deleteState->dstNodeIDVector, deleteState->relIDVector); - KU_ASSERT(deleted == reverseDeleted); + RYU_ASSERT(deleted == reverseDeleted); } } tempState->getSelVectorUnsafe().setToUnfiltered(); @@ -392,7 +392,7 @@ RelTableData* RelTable::getDirectedTableData(RelDataDirection direction) const { "Failed to get {} data for rel table \"{}\", please set the storage direction to BOTH", RelDirectionUtils::relDirectionToString(direction), tableName)); } - KU_ASSERT(directedRelData[directionIdx]->getDirection() == direction); + RYU_ASSERT(directedRelData[directionIdx]->getDirection() == direction); return directedRelData[directionIdx].get(); } @@ -463,7 +463,7 @@ void RelTable::updateRelOffsets(const LocalRelTable& localRelTable) { RUNTIME_CHECK(uint64_t totalNumRows = 0); for (auto i = 0u; i < localNodeGroup.getNumChunkedGroups(); i++) { const auto chunkedGroup = localNodeGroup.getChunkedNodeGroup(i); - KU_ASSERT(chunkedGroup); + RYU_ASSERT(chunkedGroup); auto& internalIDChunk = chunkedGroup->getColumnChunk(LOCAL_REL_ID_COLUMN_ID); RUNTIME_CHECK(totalNumRows += internalIDChunk.getNumValues()); for (auto rowIdx = 0u; rowIdx < internalIDChunk.getNumValues(); rowIdx++) { @@ -474,7 +474,7 @@ void RelTable::updateRelOffsets(const LocalRelTable& localRelTable) { internalIDChunk.setTableID(tableID); } - KU_ASSERT(totalNumRows == localNodeGroup.getNumRows()); + RYU_ASSERT(totalNumRows == localNodeGroup.getNumRows()); } offset_t RelTable::getCommittedOffset(offset_t uncommittedOffset, offset_t maxCommittedOffset) { diff --git a/src/storage/table/rel_table_data.cpp b/src/storage/table/rel_table_data.cpp index 74cea803df..f9190c6cd3 100644 --- a/src/storage/table/rel_table_data.cpp +++ b/src/storage/table/rel_table_data.cpp @@ -106,15 +106,15 @@ void RelTableData::initPropertyColumns(const RelGroupCatalogEntry& relGroupEntry bool RelTableData::update(Transaction* transaction, ValueVector& boundNodeIDVector, const ValueVector& relIDVector, column_id_t columnID, const ValueVector& dataVector) const { - KU_ASSERT(boundNodeIDVector.state->getSelVector().getSelSize() == 1); - KU_ASSERT(relIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(boundNodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(relIDVector.state->getSelVector().getSelSize() == 1); const auto boundNodePos = boundNodeIDVector.state->getSelVector()[0]; const auto relIDPos = relIDVector.state->getSelVector()[0]; if (boundNodeIDVector.isNull(boundNodePos) || relIDVector.isNull(relIDPos)) { return false; } const auto [source, rowIdx] = findMatchingRow(transaction, boundNodeIDVector, relIDVector); - KU_ASSERT(rowIdx != INVALID_ROW_IDX); + RYU_ASSERT(rowIdx != INVALID_ROW_IDX); const auto boundNodeOffset = boundNodeIDVector.getValue(boundNodePos).offset; const auto nodeGroupIdx = StorageUtils::getNodeGroupIdx(boundNodeOffset); auto& csrNodeGroup = getNodeGroup(nodeGroupIdx)->cast(); @@ -153,8 +153,8 @@ void RelTableData::addColumn(TableAddColumnState& addColumnState, PageAllocator& std::pair RelTableData::findMatchingRow(Transaction* transaction, ValueVector& boundNodeIDVector, const ValueVector& relIDVector) const { - KU_ASSERT(boundNodeIDVector.state->getSelVector().getSelSize() == 1); - KU_ASSERT(relIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(boundNodeIDVector.state->getSelVector().getSelSize() == 1); + RYU_ASSERT(relIDVector.state->getSelVector().getSelSize() == 1); const auto boundNodePos = boundNodeIDVector.state->getSelVector()[0]; const auto relIDPos = relIDVector.state->getSelVector()[0]; const auto boundNodeOffset = boundNodeIDVector.getValue(boundNodePos).offset; @@ -196,7 +196,7 @@ std::pair RelTableData::findMatchingRow(Trans bool RelTableData::checkIfNodeHasRels(Transaction* transaction, ValueVector* srcNodeIDVector) const { - KU_ASSERT(srcNodeIDVector->state->isFlat()); + RYU_ASSERT(srcNodeIDVector->state->isFlat()); const auto nodeIDPos = srcNodeIDVector->state->getSelVector()[0]; const auto nodeOffset = srcNodeIDVector->getValue(nodeIDPos).offset; const auto nodeGroupIdx = StorageUtils::getNodeGroupIdx(nodeOffset); @@ -229,7 +229,7 @@ void RelTableData::pushInsertInfo(const Transaction* transaction, const CSRNodeG row_idx_t numRows_, CSRNodeGroupScanSource source) { // we shouldn't be appending directly to the to the persistent data // unless we are performing batch insert and the persistent chunked group is empty - KU_ASSERT(source != CSRNodeGroupScanSource::COMMITTED_PERSISTENT || + RYU_ASSERT(source != CSRNodeGroupScanSource::COMMITTED_PERSISTENT || !nodeGroup.getPersistentChunkedGroup() || nodeGroup.getPersistentChunkedGroup()->getNumRows() == 0); @@ -274,7 +274,7 @@ const VersionRecordHandler* RelTableData::getVersionRecordHandler( if (source == CSRNodeGroupScanSource::COMMITTED_PERSISTENT) { return &persistentVersionRecordHandler; } else { - KU_ASSERT(source == CSRNodeGroupScanSource::COMMITTED_IN_MEMORY); + RYU_ASSERT(source == CSRNodeGroupScanSource::COMMITTED_IN_MEMORY); return &inMemoryVersionRecordHandler; } } diff --git a/src/storage/table/string_chunk_data.cpp b/src/storage/table/string_chunk_data.cpp index 15fbadf739..cb0cb73984 100644 --- a/src/storage/table/string_chunk_data.cpp +++ b/src/storage/table/string_chunk_data.cpp @@ -74,7 +74,7 @@ void StringChunkData::resetToEmpty() { void StringChunkData::append(ValueVector* vector, const SelectionView& selView) { selView.forEach([&](auto pos) { // index is stored in main chunk, data is stored in the data chunk - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); // index is stored in main chunk, data is stored in the data chunk nullData->setNull(numValues, vector->isNull(pos)); auto dstPos = numValues; @@ -96,14 +96,14 @@ void StringChunkData::append(const ColumnChunkData* other, offset_t startPosInOt appendStringColumnChunk(&otherChunk, startPosInOtherChunk, numValuesToAppend); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } void StringChunkData::scan(ValueVector& output, offset_t offset, length_t length, sel_t posInOutputVector) const { - KU_ASSERT(offset + length <= numValues && nullData); + RYU_ASSERT(offset + length <= numValues && nullData); nullData->scan(output, offset, length, posInOutputVector); if (!nullData->noNullsGuaranteedInMem()) { for (auto i = 0u; i < length; i++) { @@ -122,7 +122,7 @@ void StringChunkData::scan(ValueVector& output, offset_t offset, length_t length void StringChunkData::lookup(offset_t offsetInChunk, ValueVector& output, sel_t posInOutputVector) const { - KU_ASSERT(offsetInChunk < numValues); + RYU_ASSERT(offsetInChunk < numValues); output.setNull(posInOutputVector, nullData->isNull(offsetInChunk)); if (nullData->isNull(offsetInChunk)) { return; @@ -148,7 +148,7 @@ void StringChunkData::initializeScanState(SegmentState& state, const Column* col void StringChunkData::write(const ValueVector* vector, offset_t offsetInVector, offset_t offsetInChunk) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING); if (!needFinalize && offsetInChunk < numValues) [[unlikely]] { needFinalize = true; } @@ -163,7 +163,7 @@ void StringChunkData::write(const ValueVector* vector, offset_t offsetInVector, } void StringChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity) { - KU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING && + RYU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING && dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && chunk->getNumValues() == dstOffsets->getNumValues()); auto& stringChunk = chunk->cast(); @@ -185,7 +185,7 @@ void StringChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, void StringChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetInChunk, offset_t dstOffsetInChunk, offset_t numValuesToCopy) { - KU_ASSERT(srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING); if ((dstOffsetInChunk + numValuesToCopy) >= numValues) { updateNumValues(dstOffsetInChunk + numValuesToCopy); } @@ -304,14 +304,14 @@ void StringChunkData::deserialize(Deserializer& deSer, ColumnChunkData& chunkDat template<> ku_string_t StringChunkData::getValue(offset_t) const { - KU_UNREACHABLE; + RYU_UNREACHABLE; } // STRING template<> std::string_view StringChunkData::getValue(offset_t pos) const { - KU_ASSERT(pos < numValues); - KU_ASSERT(!nullData->isNull(pos)); + RYU_ASSERT(pos < numValues); + RYU_ASSERT(!nullData->isNull(pos)); auto index = indexColumnChunk->getValue(pos); return dictionaryChunk->getString(index); } diff --git a/src/storage/table/string_column.cpp b/src/storage/table/string_column.cpp index 3ae4a304d4..0ba33b9cef 100644 --- a/src/storage/table/string_column.cpp +++ b/src/storage/table/string_column.cpp @@ -122,12 +122,12 @@ std::vector> StringColumn::checkpointSegment( void StringColumn::scanSegment(const SegmentState& state, offset_t startOffsetInChunk, row_idx_t numValuesToScan, ValueVector* resultVector, offset_t offsetInResult) const { if (nullColumn) { - KU_ASSERT(state.nullState); + RYU_ASSERT(state.nullState); nullColumn->scanSegment(*state.nullState, startOffsetInChunk, numValuesToScan, resultVector, offsetInResult); } - KU_ASSERT(resultVector->dataType.getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(resultVector->dataType.getPhysicalType() == PhysicalTypeID::STRING); if (!resultVector->state || resultVector->state->getSelVector().isUnfiltered()) { scanUnfiltered(state, startOffsetInChunk, numValuesToScan, resultVector, offsetInResult); } else { @@ -139,7 +139,7 @@ void StringColumn::scanSegment(const SegmentState& state, ColumnChunkData* resul common::offset_t startOffsetInSegment, common::row_idx_t numValuesToScan) const { auto startOffsetInResult = resultChunk->getNumValues(); Column::scanSegment(state, resultChunk, startOffsetInSegment, numValuesToScan); - KU_ASSERT(resultChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING); + RYU_ASSERT(resultChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING); auto* stringResultChunk = ku_dynamic_cast(resultChunk); // Revert change to numValues from Column::scanSegment (see note in list_column.cpp) @@ -191,7 +191,7 @@ void StringColumn::scanSegment(const SegmentState& state, ColumnChunkData* resul getChildState(state, ChildStateIndex::DATA), offsetsToScan, stringResultChunk, getChildState(state, ChildStateIndex::INDEX).metadata); } - KU_ASSERT(resultChunk->getNumValues() == startOffsetInResult + numValuesToScan && + RYU_ASSERT(resultChunk->getNumValues() == startOffsetInResult + numValuesToScan && stringResultChunk->getIndexColumnChunk()->getNumValues() == startOffsetInResult + numValuesToScan); RUNTIME_CHECK({ @@ -202,7 +202,7 @@ void StringColumn::scanSegment(const SegmentState& state, ColumnChunkData* resul if (!stringResultChunk->isNull(i)) { auto stringIndex = stringResultChunk->getIndexColumnChunk()->getValue(i); - KU_ASSERT(stringIndex < dictionarySize); + RYU_ASSERT(stringIndex < dictionarySize); } } }); diff --git a/src/storage/table/struct_chunk_data.cpp b/src/storage/table/struct_chunk_data.cpp index 5658e61ed4..29e250ec22 100644 --- a/src/storage/table/struct_chunk_data.cpp +++ b/src/storage/table/struct_chunk_data.cpp @@ -120,9 +120,9 @@ uint64_t StructChunkData::getSizeOnDiskInMemoryStats() const { void StructChunkData::append(const ColumnChunkData* other, offset_t startPosInOtherChunk, uint32_t numValuesToAppend) { - KU_ASSERT(other->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(other->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); const auto& otherStructChunk = other->cast(); - KU_ASSERT(childChunks.size() == otherStructChunk.childChunks.size()); + RYU_ASSERT(childChunks.size() == otherStructChunk.childChunks.size()); nullData->append(other->getNullData(), startPosInOtherChunk, numValuesToAppend); for (auto i = 0u; i < childChunks.size(); i++) { childChunks[i]->append(otherStructChunk.childChunks[i].get(), startPosInOtherChunk, @@ -144,7 +144,7 @@ void StructChunkData::append(ValueVector* vector, const SelectionView& selView) void StructChunkData::scan(ValueVector& output, offset_t offset, length_t length, sel_t posInOutputVector) const { - KU_ASSERT(offset + length <= numValues); + RYU_ASSERT(offset + length <= numValues); if (nullData) { nullData->scan(output, offset, length, posInOutputVector); } @@ -157,7 +157,7 @@ void StructChunkData::scan(ValueVector& output, offset_t offset, length_t length void StructChunkData::lookup(offset_t offsetInChunk, ValueVector& output, sel_t posInOutputVector) const { - KU_ASSERT(offsetInChunk < numValues); + RYU_ASSERT(offsetInChunk < numValues); const auto numFields = StructType::getNumFields(dataType); output.setNull(posInOutputVector, nullData->isNull(offsetInChunk)); for (auto i = 0u; i < numFields; i++) { @@ -208,7 +208,7 @@ void StructChunkData::resetToEmpty() { void StructChunkData::write(const ValueVector* vector, offset_t offsetInVector, offset_t offsetInChunk) { - KU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRUCT); nullData->setNull(offsetInChunk, vector->isNull(offsetInVector)); const auto fields = StructVector::getFieldVectors(vector); for (auto i = 0u; i < fields.size(); i++) { @@ -221,11 +221,11 @@ void StructChunkData::write(const ValueVector* vector, offset_t offsetInVector, void StructChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity multiplicity) { - KU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT && + RYU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT && dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID); for (auto i = 0u; i < dstOffsets->getNumValues(); i++) { const auto offsetInChunk = dstOffsets->getValue(i); - KU_ASSERT(offsetInChunk < capacity); + RYU_ASSERT(offsetInChunk < capacity); nullData->setNull(offsetInChunk, chunk->getNullData()->isNull(i)); numValues = offsetInChunk >= numValues ? offsetInChunk + 1 : numValues; } @@ -237,9 +237,9 @@ void StructChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, void StructChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetInChunk, offset_t dstOffsetInChunk, offset_t numValuesToCopy) { - KU_ASSERT(srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); const auto& srcStructChunk = srcChunk->cast(); - KU_ASSERT(childChunks.size() == srcStructChunk.childChunks.size()); + RYU_ASSERT(childChunks.size() == srcStructChunk.childChunks.size()); nullData->write(srcChunk->getNullData(), srcOffsetInChunk, dstOffsetInChunk, numValuesToCopy); if ((dstOffsetInChunk + numValuesToCopy) >= numValues) { numValues = dstOffsetInChunk + numValuesToCopy; diff --git a/src/storage/table/struct_column.cpp b/src/storage/table/struct_column.cpp index 6b61a16bde..11d8b9804e 100644 --- a/src/storage/table/struct_column.cpp +++ b/src/storage/table/struct_column.cpp @@ -43,7 +43,7 @@ std::unique_ptr StructColumn::flushChunkData(const ColumnChunkD void StructColumn::scanSegment(const SegmentState& state, ColumnChunkData* resultChunk, common::offset_t startOffsetInSegment, common::row_idx_t numValuesToScan) const { - KU_ASSERT(resultChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(resultChunk->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); // Fix size since Column::scanSegment will adjust the size of the child chunks to be equal to // the size of the main one (see note in list_column.cpp) // TODO(bmwinger): eventually this shouldn't be necessary @@ -79,7 +79,7 @@ void StructColumn::lookupInternal(const SegmentState& state, offset_t offsetInSe void StructColumn::writeSegment(ColumnChunkData& persistentChunk, SegmentState& state, offset_t offsetInSegment, const ColumnChunkData& data, offset_t dataOffset, length_t numValues) const { - KU_ASSERT(data.getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); + RYU_ASSERT(data.getDataType().getPhysicalType() == PhysicalTypeID::STRUCT); nullColumn->writeSegment(*persistentChunk.getNullData(), *state.nullState, offsetInSegment, *data.getNullData(), dataOffset, numValues); auto& structData = data.cast(); @@ -124,7 +124,7 @@ bool StructColumn::canCheckpointInPlace(const SegmentState& state, } for (size_t i = 0; i < childColumns.size(); ++i) { auto& structChunkData = checkpointState.persistentData.cast(); - KU_ASSERT(childColumns.size() == structChunkData.getNumChildren()); + RYU_ASSERT(childColumns.size() == structChunkData.getNumChildren()); auto* childChunkData = structChunkData.getChild(i); std::vector childSegmentCheckpointStates; diff --git a/src/storage/table/table.cpp b/src/storage/table/table.cpp index 52a57c29e4..57c583dc79 100644 --- a/src/storage/table/table.cpp +++ b/src/storage/table/table.cpp @@ -14,8 +14,8 @@ TableScanState::~TableScanState() = default; // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const. void TableScanState::resetOutVectors() { for (const auto& outputVector : outputVectors) { - KU_ASSERT(outputVector->state.get() == outState.get()); - KU_UNUSED(outputVector); + RYU_ASSERT(outputVector->state.get() == outState.get()); + RYU_UNUSED(outputVector); outputVector->resetAuxiliaryBuffer(); } outState->getSelVectorUnsafe().setToUnfiltered(); diff --git a/src/storage/table/update_info.cpp b/src/storage/table/update_info.cpp index f23da7584b..d9084a920b 100644 --- a/src/storage/table/update_info.cpp +++ b/src/storage/table/update_info.cpp @@ -27,7 +27,7 @@ VectorUpdateInfo& UpdateInfo::update(MemoryManager& memoryManager, const Transac while (current) { if (current->version == transaction->getID()) { // Same transaction, we can update the existing vector info. - KU_ASSERT(current->version >= Transaction::START_TRANSACTION_ID); + RYU_ASSERT(current->version >= Transaction::START_TRANSACTION_ID); vecUpdateInfo = current; } else if (current->version > transaction->getStartTS()) { // Potentially there can be conflicts. `current` can be uncommitted transaction (version @@ -52,7 +52,7 @@ VectorUpdateInfo& UpdateInfo::update(MemoryManager& memoryManager, const Transac newInfo->prev = std::move(currentInfo); header.info = std::move(newInfo); } - KU_ASSERT(vecUpdateInfo); + RYU_ASSERT(vecUpdateInfo); // Check if the row is already updated in this transaction. idx_t idxInUpdateData = INVALID_IDX; for (auto i = 0u; i < vecUpdateInfo->numRowsUpdated; i++) { @@ -123,14 +123,14 @@ void UpdateInfo::iterateVectorInfo(const Transaction* transaction, idx_t idx, } // We lock the head of the chain to ensure that we can safely read from any part of the // chain. - KU_ASSERT(head); + RYU_ASSERT(head); std::shared_lock chainLock{head->mtx}; auto current = head->info.get(); - KU_ASSERT(current); + RYU_ASSERT(current); while (current) { if (current->version == transaction->getID() || current->version <= transaction->getStartTS()) { - KU_ASSERT((current->version == transaction->getID() && + RYU_ASSERT((current->version == transaction->getID() && current->version >= Transaction::START_TRANSACTION_ID) || (current->version <= transaction->getStartTS() && current->version < Transaction::START_TRANSACTION_ID)); @@ -157,7 +157,7 @@ static bool validateUpdateChain(const UpdateNode& updatedNode, const VectorUpdat void UpdateInfo::commit(idx_t vectorIdx, VectorUpdateInfo* info, transaction_t commitTS) { auto& updateNode = getUpdateNode(vectorIdx); std::unique_lock chainLock{updateNode.mtx}; - KU_ASSERT(validateUpdateChain(updateNode, info)); + RYU_ASSERT(validateUpdateChain(updateNode, info)); info->version = commitTS; } @@ -167,10 +167,10 @@ void UpdateInfo::rollback(idx_t vectorIdx, transaction_t version) { // head of the version chain. This is just a simplification and should be optimized later. { std::unique_lock lock{mtx}; - KU_ASSERT(updates.size() > vectorIdx); + RYU_ASSERT(updates.size() > vectorIdx); header = updates[vectorIdx].get(); } - KU_ASSERT(header); + RYU_ASSERT(header); std::unique_lock chainLock{header->mtx}; // First check if this version is still in the chain. It might have been removed by // a previous rollback entry of the same transaction. @@ -187,7 +187,7 @@ void UpdateInfo::rollback(idx_t vectorIdx, transaction_t version) { } newerVersion->setPrev(std::move(prevVersion)); } else { - KU_ASSERT(header->info.get() == current); + RYU_ASSERT(header->info.get() == current); // This is the beginning of the version chain. if (prevVersion) { prevVersion->next = nullptr; diff --git a/src/storage/table/version_info.cpp b/src/storage/table/version_info.cpp index 6db661b6ea..b0f789ebed 100644 --- a/src/storage/table/version_info.cpp +++ b/src/storage/table/version_info.cpp @@ -89,7 +89,7 @@ void VectorVersionInfo::append(const transaction_t transactionID, const row_idx_ sameInsertionVersion = INVALID_TRANSACTION; } for (auto i = 0u; i < numRows; i++) { - KU_ASSERT(insertedVersions->operator[](startRow + i) == INVALID_TRANSACTION); + RYU_ASSERT(insertedVersions->operator[](startRow + i) == INVALID_TRANSACTION); insertedVersions->operator[](startRow + i) = transactionID; } } @@ -126,7 +126,7 @@ void VectorVersionInfo::setInsertCommitTS(transaction_t commitTS, row_idx_t star sameInsertionVersion = commitTS; return; } - KU_ASSERT(insertedVersions); + RYU_ASSERT(insertedVersions); for (auto rowIdx = startRow; rowIdx < startRow + numRows; rowIdx++) { insertedVersions->operator[](rowIdx) = commitTS; } @@ -138,7 +138,7 @@ void VectorVersionInfo::setDeleteCommitTS(transaction_t commitTS, row_idx_t star sameDeletionVersion = commitTS; return; } - KU_ASSERT(deletedVersions); + RYU_ASSERT(deletedVersions); for (auto rowIdx = startRow; rowIdx < startRow + numRows; rowIdx++) { deletedVersions->operator[](rowIdx) = commitTS; } @@ -200,7 +200,7 @@ bool VectorVersionInfo::isDeleted(const transaction_t startTS, const transaction if (isSameDeletionVersion()) { deletion = sameDeletionVersion; } else { - KU_ASSERT(deletedVersions); + RYU_ASSERT(deletedVersions); deletion = deletedVersions->operator[](rowIdx); } const auto isDeletedWithinSameTransaction = deletion == transactionID; @@ -208,7 +208,7 @@ bool VectorVersionInfo::isDeleted(const transaction_t startTS, const transaction return isDeletedWithinSameTransaction || isDeletedByPrevCommittedTransaction; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -227,7 +227,7 @@ bool VectorVersionInfo::isInserted(const transaction_t startTS, const transactio if (isSameInsertionVersion()) { insertion = sameInsertionVersion; } else { - KU_ASSERT(insertedVersions); + RYU_ASSERT(insertedVersions); insertion = insertedVersions->operator[](rowIdx); } const auto isInsertedWithinSameTransaction = insertion == transactionID; @@ -235,7 +235,7 @@ bool VectorVersionInfo::isInserted(const transaction_t startTS, const transactio return isInsertedWithinSameTransaction || isInsertedByPrevCommittedTransaction; } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -329,12 +329,12 @@ void VectorVersionInfo::serialize(Serializer& serializer) const { if (deletedVersions) { for (const auto deleted : *deletedVersions) { // Versions should be either INVALID_TRANSACTION or committed timestamps. - KU_ASSERT(deleted == INVALID_TRANSACTION || + RYU_ASSERT(deleted == INVALID_TRANSACTION || deleted < transaction::Transaction::START_TRANSACTION_ID); - KU_UNUSED(deleted); + RYU_UNUSED(deleted); } } - KU_ASSERT(insertionStatus == InsertionStatus::NO_INSERTED || + RYU_ASSERT(insertionStatus == InsertionStatus::NO_INSERTED || insertionStatus == InsertionStatus::ALWAYS_INSERTED); serializer.writeDebuggingInfo("insertion_status"); serializer.serializeValue(insertionStatus); @@ -348,13 +348,13 @@ void VectorVersionInfo::serialize(Serializer& serializer) const { serializer.writeDebuggingInfo("same_deletion_version"); serializer.serializeValue(sameDeletionVersion); if (sameDeletionVersion == INVALID_TRANSACTION) { - KU_ASSERT(deletedVersions); + RYU_ASSERT(deletedVersions); serializer.writeDebuggingInfo("deleted_versions"); serializer.serializeArray(*deletedVersions); } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -364,7 +364,7 @@ std::unique_ptr VectorVersionInfo::deSerialize(Deserializer& auto vectorVersionInfo = std::make_unique(); deSer.validateDebuggingInfo(key, "insertion_status"); deSer.deserializeValue(vectorVersionInfo->insertionStatus); - KU_ASSERT(vectorVersionInfo->insertionStatus == InsertionStatus::NO_INSERTED || + RYU_ASSERT(vectorVersionInfo->insertionStatus == InsertionStatus::NO_INSERTED || vectorVersionInfo->insertionStatus == InsertionStatus::ALWAYS_INSERTED); deSer.validateDebuggingInfo(key, "deletion_status"); deSer.deserializeValue(vectorVersionInfo->deletionStatus); @@ -383,15 +383,15 @@ std::unique_ptr VectorVersionInfo::deSerialize(Deserializer& } } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } if (vectorVersionInfo->deletedVersions) { for (const auto deleted : *vectorVersionInfo->deletedVersions) { // Versions should be either INVALID_TRANSACTION or committed timestamps. - KU_ASSERT(deleted == INVALID_TRANSACTION || + RYU_ASSERT(deleted == INVALID_TRANSACTION || deleted < transaction::Transaction::START_TRANSACTION_ID); - KU_UNUSED(deleted); + RYU_UNUSED(deleted); } } return vectorVersionInfo; @@ -506,11 +506,11 @@ void VersionInfo::getSelVectorToScan(const transaction_t startTS, const transact outputPos += numRowsInVector; vectorIdx++; } - KU_ASSERT(outputPos <= DEFAULT_VECTOR_CAPACITY); + RYU_ASSERT(outputPos <= DEFAULT_VECTOR_CAPACITY); } void VersionInfo::clearVectorInfo(const idx_t vectorIdx) { - KU_ASSERT(vectorIdx < vectorsInfo.size()); + RYU_ASSERT(vectorIdx < vectorsInfo.size()); vectorsInfo[vectorIdx] = nullptr; } diff --git a/src/storage/undo_buffer.cpp b/src/storage/undo_buffer.cpp index 3a034cbc6c..3925474d92 100644 --- a/src/storage/undo_buffer.cpp +++ b/src/storage/undo_buffer.cpp @@ -126,7 +126,7 @@ void UndoBuffer::createDeleteInfo(node_group_idx_t nodeGroupIdx, row_idx_t start void UndoBuffer::createVersionInfo(const UndoRecordType recordType, row_idx_t startRow, row_idx_t numRows, const VersionRecordHandler* versionRecordHandler, node_group_idx_t nodeGroupIdx) { - KU_ASSERT(versionRecordHandler); + RYU_ASSERT(versionRecordHandler); auto buffer = createUndoRecord(sizeof(UndoRecordHeader) + sizeof(VersionRecord)); const UndoRecordHeader recordHeader{recordType, sizeof(VersionRecord)}; *reinterpret_cast(buffer) = recordHeader; @@ -192,14 +192,14 @@ void UndoBuffer::commitRecord(UndoRecordType recordType, const uint8_t* record, commitVectorUpdateInfo(record, commitTS); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } void UndoBuffer::commitCatalogEntryRecord(const uint8_t* record, const transaction_t commitTS) { const auto& [_, catalogEntry] = *reinterpret_cast(record); const auto newCatalogEntry = catalogEntry->getNext(); - KU_ASSERT(newCatalogEntry); + RYU_ASSERT(newCatalogEntry); newCatalogEntry->setTimestamp(commitTS); } @@ -216,15 +216,15 @@ void UndoBuffer::commitVersionInfo(UndoRecordType recordType, const uint8_t* rec undoRecord.nodeGroupIdx, undoRecord.startRow, undoRecord.numRows, commitTS); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } void UndoBuffer::commitVectorUpdateInfo(const uint8_t* record, transaction_t commitTS) { auto& undoRecord = *reinterpret_cast(record); - KU_ASSERT(undoRecord.updateInfo); - KU_ASSERT(undoRecord.vectorUpdateInfo); + RYU_ASSERT(undoRecord.updateInfo); + RYU_ASSERT(undoRecord.vectorUpdateInfo); undoRecord.updateInfo->commit(undoRecord.vectorIdx, undoRecord.vectorUpdateInfo, commitTS); } @@ -245,7 +245,7 @@ void UndoBuffer::rollbackRecord(ClientContext* context, const UndoRecordType rec rollbackVectorUpdateInfo(record); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -253,7 +253,7 @@ void UndoBuffer::rollbackRecord(ClientContext* context, const UndoRecordType rec void UndoBuffer::rollbackCatalogEntryRecord(const uint8_t* record) { const auto& [catalogSet, catalogEntry] = *reinterpret_cast(record); const auto entryToRollback = catalogEntry->getNext(); - KU_ASSERT(entryToRollback); + RYU_ASSERT(entryToRollback); if (entryToRollback->getNext()) { // If entryToRollback has a newer entry (next) in the version chain. Simple remove // entryToRollback from the chain. @@ -294,14 +294,14 @@ void UndoBuffer::rollbackVersionInfo(ClientContext* context, UndoRecordType reco transaction::Transaction::Get(*context)->getCommitTS()); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } void UndoBuffer::rollbackVectorUpdateInfo(const uint8_t* record) { auto& undoRecord = *reinterpret_cast(record); - KU_ASSERT(undoRecord.updateInfo); + RYU_ASSERT(undoRecord.updateInfo); undoRecord.updateInfo->rollback(undoRecord.vectorIdx, undoRecord.version); } diff --git a/src/storage/wal/checksum_reader.cpp b/src/storage/wal/checksum_reader.cpp index c46cd3cdb9..586777884c 100644 --- a/src/storage/wal/checksum_reader.cpp +++ b/src/storage/wal/checksum_reader.cpp @@ -44,7 +44,7 @@ void ChecksumReader::onObjectBegin() { } void ChecksumReader::onObjectEnd() { - KU_ASSERT(currentEntrySize.has_value()); + RYU_ASSERT(currentEntrySize.has_value()); const uint64_t computedChecksum = common::checksum(entryBuffer->getData(), *currentEntrySize); uint64_t storedChecksum{}; deserializer.deserializeValue(storedChecksum); diff --git a/src/storage/wal/checksum_writer.cpp b/src/storage/wal/checksum_writer.cpp index 6f5232ecf2..bb72474997 100644 --- a/src/storage/wal/checksum_writer.cpp +++ b/src/storage/wal/checksum_writer.cpp @@ -48,7 +48,7 @@ void ChecksumWriter::onObjectBegin() { } void ChecksumWriter::onObjectEnd() { - KU_ASSERT(currentEntrySize.has_value()); + RYU_ASSERT(currentEntrySize.has_value()); const auto checksum = common::checksum(entryBuffer->getData(), *currentEntrySize); outputSerializer.write(entryBuffer->getData(), *currentEntrySize); outputSerializer.serializeValue(checksum); diff --git a/src/storage/wal/local_wal.cpp b/src/storage/wal/local_wal.cpp index 52901d9766..a53221afb3 100644 --- a/src/storage/wal/local_wal.cpp +++ b/src/storage/wal/local_wal.cpp @@ -103,7 +103,7 @@ uint64_t LocalWAL::getSize() { // NOLINTNEXTLINE(readability-make-member-function-const): semantically non-const function. void LocalWAL::addNewWALRecord(const WALRecord& walRecord) { std::unique_lock lck{mtx}; - KU_ASSERT(walRecord.type != WALRecordType::INVALID_RECORD); + RYU_ASSERT(walRecord.type != WALRecordType::INVALID_RECORD); serializer.getWriter()->onObjectBegin(); walRecord.serialize(serializer); serializer.getWriter()->onObjectEnd(); diff --git a/src/storage/wal/wal.cpp b/src/storage/wal/wal.cpp index 19c85a0ccd..c341e53019 100644 --- a/src/storage/wal/wal.cpp +++ b/src/storage/wal/wal.cpp @@ -26,7 +26,7 @@ WAL::WAL(const std::string& dbPath, bool readOnly, bool enableChecksums, Virtual WAL::~WAL() {} void WAL::logCommittedWAL(LocalWAL& localWAL, main::ClientContext* context) { - KU_ASSERT(!readOnly); + RYU_ASSERT(!readOnly); if (inMemory || localWAL.getSize() == 0) { return; // No need to log empty WAL. } @@ -105,16 +105,16 @@ void WAL::initWriter(main::ClientContext* context) { // NOLINTNEXTLINE(readability-make-member-function-const): semantically non-const function. void WAL::addNewWALRecordNoLock(const WALRecord& walRecord) { - KU_ASSERT(walRecord.type != WALRecordType::INVALID_RECORD); - KU_ASSERT(!inMemory); - KU_ASSERT(serializer != nullptr); + RYU_ASSERT(walRecord.type != WALRecordType::INVALID_RECORD); + RYU_ASSERT(!inMemory); + RYU_ASSERT(serializer != nullptr); serializer->getWriter()->onObjectBegin(); walRecord.serialize(*serializer); serializer->getWriter()->onObjectEnd(); } WAL* WAL::Get(const main::ClientContext& context) { - KU_ASSERT(context.getDatabase() && context.getDatabase()->getStorageManager()); + RYU_ASSERT(context.getDatabase() && context.getDatabase()->getStorageManager()); return &context.getDatabase()->getStorageManager()->getWAL(); } diff --git a/src/storage/wal/wal_record.cpp b/src/storage/wal/wal_record.cpp index 51c7346e3c..160e3aee15 100644 --- a/src/storage/wal/wal_record.cpp +++ b/src/storage/wal/wal_record.cpp @@ -76,7 +76,7 @@ std::unique_ptr WALRecord::deserialize(Deserializer& deserializer, throw RuntimeException("Corrupted wal file. Read out invalid WAL record type."); } default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } walRecord->type = type; @@ -182,7 +182,7 @@ static void serializeAlterExtraInfo(Serializer& serializer, const BoundAlterInfo serializer.write(connectionInfo->toTableID); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -230,7 +230,7 @@ static decltype(auto) deserializeAlterRecord(Deserializer& deserializer) { extraInfo = std::make_unique(fromTableID, toTableID); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return std::make_tuple(alterType, tableName, std::move(extraInfo)); diff --git a/src/storage/wal/wal_replayer.cpp b/src/storage/wal/wal_replayer.cpp index f852b8cf5a..017ab76ad8 100644 --- a/src/storage/wal/wal_replayer.cpp +++ b/src/storage/wal/wal_replayer.cpp @@ -135,7 +135,7 @@ void WALReplayer::replay(bool throwOnWalReplayFailure, bool enableChecksums) con } while (getReadOffset(deserializer, enableChecksums) < offsetDeserialized) { - KU_ASSERT(!deserializer.finished()); + RYU_ASSERT(!deserializer.finished()); auto walRecord = WALRecord::deserialize(deserializer, clientContext); replayWALRecord(*walRecord); } @@ -175,7 +175,7 @@ WALReplayer::WALReplayInfo WALReplayer::dryReplay(FileInfo& fileInfo, bool throw finishedDeserializing = deserializer.finished(); switch (walRecord->type) { case WALRecordType::CHECKPOINT_RECORD: { - KU_ASSERT(finishedDeserializing); + RYU_ASSERT(finishedDeserializing); // If we reach a checkpoint record, we can stop replaying. isLastRecordCheckpoint = true; finishedDeserializing = true; @@ -247,10 +247,10 @@ void WALReplayer::replayWALRecord(WALRecord& walRecord) const { case WALRecordType::CHECKPOINT_RECORD: { // This record should not be replayed. It is only used to indicate that the previous records // had been replayed and shadow files are created. - KU_UNREACHABLE; + RYU_UNREACHABLE; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -285,7 +285,7 @@ void WALReplayer::replayCreateCatalogEntryRecord(WALRecord& walRecord) const { catalog->createIndex(transaction, std::move(record.ownedCatalogEntry)); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -298,7 +298,7 @@ void WALReplayer::replayDropCatalogEntryRecord(const WALRecord& walRecord) const switch (dropEntryRecord.entryType) { case CatalogEntryType::NODE_TABLE_ENTRY: case CatalogEntryType::REL_GROUP_ENTRY: { - KU_ASSERT(Catalog::Get(clientContext)); + RYU_ASSERT(Catalog::Get(clientContext)); catalog->dropTableEntry(transaction, entryID); } break; case CatalogEntryType::SEQUENCE_ENTRY: { @@ -311,7 +311,7 @@ void WALReplayer::replayDropCatalogEntryRecord(const WALRecord& walRecord) const catalog->dropMacroEntry(transaction, entryID); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -338,7 +338,7 @@ void WALReplayer::replayAlterTableEntryRecord(const WALRecord& walRecord) const const auto entry = catalog->getTableCatalogEntry(transaction, ownedAlterInfo->tableName); const auto& addedProp = entry->getProperty(addInfo->propertyDefinition.getName()); TableAddColumnState state{addedProp, *defaultValueEvaluator}; - KU_ASSERT(StorageManager::Get(clientContext)); + RYU_ASSERT(StorageManager::Get(clientContext)); switch (entry->getTableType()) { case TableType::REL: { for (auto& relEntryInfo : entry->cast().getRelEntryInfos()) { @@ -351,7 +351,7 @@ void WALReplayer::replayAlterTableEntryRecord(const WALRecord& walRecord) const ->addColumn(transaction, state, pageAllocator); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } break; @@ -387,7 +387,7 @@ void WALReplayer::replayNodeTableInsertRecord(const WALRecord& walRecord) const const auto& insertionRecord = walRecord.constCast(); const auto tableID = insertionRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); - KU_ASSERT(!insertionRecord.ownedVectors.empty()); + RYU_ASSERT(!insertionRecord.ownedVectors.empty()); const auto anchorState = insertionRecord.ownedVectors[0]->state; const auto numNodes = anchorState->getSelVector().getSelSize(); for (auto i = 0u; i < insertionRecord.ownedVectors.size(); i++) { @@ -397,13 +397,13 @@ void WALReplayer::replayNodeTableInsertRecord(const WALRecord& walRecord) const for (auto i = 0u; i < insertionRecord.ownedVectors.size(); i++) { propertyVectors[i] = insertionRecord.ownedVectors[i].get(); } - KU_ASSERT(table.getPKColumnID() < insertionRecord.ownedVectors.size()); + RYU_ASSERT(table.getPKColumnID() < insertionRecord.ownedVectors.size()); auto& pkVector = *insertionRecord.ownedVectors[table.getPKColumnID()]; const auto nodeIDVector = std::make_unique(LogicalType::INTERNAL_ID()); nodeIDVector->setState(anchorState); const auto insertState = std::make_unique(*nodeIDVector, pkVector, propertyVectors); - KU_ASSERT(transaction::Transaction::Get(clientContext) && + RYU_ASSERT(transaction::Transaction::Get(clientContext) && transaction::Transaction::Get(clientContext)->isRecovery()); table.initInsertState(&clientContext, *insertState); anchorState->getSelVectorUnsafe().setToFiltered(1); @@ -417,7 +417,7 @@ void WALReplayer::replayRelTableInsertRecord(const WALRecord& walRecord) const { const auto& insertionRecord = walRecord.constCast(); const auto tableID = insertionRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); - KU_ASSERT(!insertionRecord.ownedVectors.empty()); + RYU_ASSERT(!insertionRecord.ownedVectors.empty()); const auto anchorState = insertionRecord.ownedVectors[0]->state; const auto numRels = anchorState->getSelVector().getSelSize(); anchorState->getSelVectorUnsafe().setToFiltered(1); @@ -435,7 +435,7 @@ void WALReplayer::replayRelTableInsertRecord(const WALRecord& walRecord) const { const auto insertState = std::make_unique( *insertionRecord.ownedVectors[LOCAL_BOUND_NODE_ID_COLUMN_ID], *insertionRecord.ownedVectors[LOCAL_NBR_NODE_ID_COLUMN_ID], propertyVectors); - KU_ASSERT(transaction::Transaction::Get(clientContext) && + RYU_ASSERT(transaction::Transaction::Get(clientContext) && transaction::Transaction::Get(clientContext)->isRecovery()); for (auto i = 0u; i < numRels; i++) { anchorState->getSelVectorUnsafe()[0] = i; @@ -449,14 +449,14 @@ void WALReplayer::replayNodeDeletionRecord(const WALRecord& walRecord) const { const auto tableID = deletionRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); const auto anchorState = deletionRecord.ownedPKVector->state; - KU_ASSERT(anchorState->getSelVector().getSelSize() == 1); + RYU_ASSERT(anchorState->getSelVector().getSelSize() == 1); const auto nodeIDVector = std::make_unique(LogicalType::INTERNAL_ID()); nodeIDVector->setState(anchorState); nodeIDVector->setValue(0, internalID_t{deletionRecord.nodeOffset, deletionRecord.tableID}); const auto deleteState = std::make_unique(*nodeIDVector, *deletionRecord.ownedPKVector); - KU_ASSERT(transaction::Transaction::Get(clientContext) && + RYU_ASSERT(transaction::Transaction::Get(clientContext) && transaction::Transaction::Get(clientContext)->isRecovery()); table.delete_(transaction::Transaction::Get(clientContext), *deleteState); } @@ -466,14 +466,14 @@ void WALReplayer::replayNodeUpdateRecord(const WALRecord& walRecord) const { const auto tableID = updateRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); const auto anchorState = updateRecord.ownedPropertyVector->state; - KU_ASSERT(anchorState->getSelVector().getSelSize() == 1); + RYU_ASSERT(anchorState->getSelVector().getSelSize() == 1); const auto nodeIDVector = std::make_unique(LogicalType::INTERNAL_ID()); nodeIDVector->setState(anchorState); nodeIDVector->setValue(0, internalID_t{updateRecord.nodeOffset, updateRecord.tableID}); const auto updateState = std::make_unique(updateRecord.columnID, *nodeIDVector, *updateRecord.ownedPropertyVector); - KU_ASSERT(transaction::Transaction::Get(clientContext) && + RYU_ASSERT(transaction::Transaction::Get(clientContext) && transaction::Transaction::Get(clientContext)->isRecovery()); table.update(transaction::Transaction::Get(clientContext), *updateState); } @@ -483,11 +483,11 @@ void WALReplayer::replayRelDeletionRecord(const WALRecord& walRecord) const { const auto tableID = deletionRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); const auto anchorState = deletionRecord.ownedRelIDVector->state; - KU_ASSERT(anchorState->getSelVector().getSelSize() == 1); + RYU_ASSERT(anchorState->getSelVector().getSelSize() == 1); const auto deleteState = std::make_unique(*deletionRecord.ownedSrcNodeIDVector, *deletionRecord.ownedDstNodeIDVector, *deletionRecord.ownedRelIDVector); - KU_ASSERT(transaction::Transaction::Get(clientContext) && + RYU_ASSERT(transaction::Transaction::Get(clientContext) && transaction::Transaction::Get(clientContext)->isRecovery()); table.delete_(transaction::Transaction::Get(clientContext), *deleteState); } @@ -496,10 +496,10 @@ void WALReplayer::replayRelDetachDeletionRecord(const WALRecord& walRecord) cons const auto& deletionRecord = walRecord.constCast(); const auto tableID = deletionRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); - KU_ASSERT(transaction::Transaction::Get(clientContext) && + RYU_ASSERT(transaction::Transaction::Get(clientContext) && transaction::Transaction::Get(clientContext)->isRecovery()); const auto anchorState = deletionRecord.ownedSrcNodeIDVector->state; - KU_ASSERT(anchorState->getSelVector().getSelSize() == 1); + RYU_ASSERT(anchorState->getSelVector().getSelSize() == 1); const auto dstNodeIDVector = std::make_unique(LogicalType{LogicalTypeID::INTERNAL_ID}); const auto relIDVector = std::make_unique(LogicalType{LogicalTypeID::INTERNAL_ID}); @@ -516,14 +516,14 @@ void WALReplayer::replayRelUpdateRecord(const WALRecord& walRecord) const { const auto tableID = updateRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); const auto anchorState = updateRecord.ownedRelIDVector->state; - KU_ASSERT(anchorState == updateRecord.ownedSrcNodeIDVector->state && + RYU_ASSERT(anchorState == updateRecord.ownedSrcNodeIDVector->state && anchorState == updateRecord.ownedSrcNodeIDVector->state && anchorState == updateRecord.ownedPropertyVector->state); - KU_ASSERT(anchorState->getSelVector().getSelSize() == 1); + RYU_ASSERT(anchorState->getSelVector().getSelSize() == 1); const auto updateState = std::make_unique(updateRecord.columnID, *updateRecord.ownedSrcNodeIDVector, *updateRecord.ownedDstNodeIDVector, *updateRecord.ownedRelIDVector, *updateRecord.ownedPropertyVector); - KU_ASSERT(transaction::Transaction::Get(clientContext) && + RYU_ASSERT(transaction::Transaction::Get(clientContext) && transaction::Transaction::Get(clientContext)->isRecovery()); table.update(transaction::Transaction::Get(clientContext), *updateState); } diff --git a/src/transaction/transaction.cpp b/src/transaction/transaction.cpp index af6e56df5f..9358f2d5c9 100644 --- a/src/transaction/transaction.cpp +++ b/src/transaction/transaction.cpp @@ -64,7 +64,7 @@ void Transaction::commit(storage::WAL* wal) { localStorage->commit(); undoBuffer->commit(commitTS); if (shouldLogToWAL()) { - KU_ASSERT(localWAL && wal); + RYU_ASSERT(localWAL && wal); localWAL->logCommit(); wal->logCommittedWAL(*localWAL, clientContext); localWAL->clear(); @@ -96,21 +96,21 @@ void Transaction::pushCreateDropCatalogEntry(CatalogSet& catalogSet, CatalogEntr if (!shouldLogToWAL() || skipLoggingToWAL) { return; } - KU_ASSERT(localWAL); + RYU_ASSERT(localWAL); const auto newCatalogEntry = catalogEntry.getNext(); switch (newCatalogEntry->getType()) { case CatalogEntryType::INDEX_ENTRY: case CatalogEntryType::NODE_TABLE_ENTRY: case CatalogEntryType::REL_GROUP_ENTRY: { if (catalogEntry.getType() == CatalogEntryType::DUMMY_ENTRY) { - KU_ASSERT(catalogEntry.isDeleted()); + RYU_ASSERT(catalogEntry.isDeleted()); localWAL->logCreateCatalogEntryRecord(newCatalogEntry, isInternal); } else { throw common::RuntimeException("This shouldn't happen. Alter table is not supported."); } } break; case CatalogEntryType::SEQUENCE_ENTRY: { - KU_ASSERT( + RYU_ASSERT( catalogEntry.getType() == CatalogEntryType::DUMMY_ENTRY && catalogEntry.isDeleted()); if (newCatalogEntry->hasParent()) { // We don't log SERIAL catalog entry creation as it is implicit @@ -120,12 +120,12 @@ void Transaction::pushCreateDropCatalogEntry(CatalogSet& catalogSet, CatalogEntr } break; case CatalogEntryType::SCALAR_MACRO_ENTRY: case CatalogEntryType::TYPE_ENTRY: { - KU_ASSERT( + RYU_ASSERT( catalogEntry.getType() == CatalogEntryType::DUMMY_ENTRY && catalogEntry.isDeleted()); localWAL->logCreateCatalogEntryRecord(newCatalogEntry, isInternal); } break; case CatalogEntryType::DUMMY_ENTRY: { - KU_ASSERT(newCatalogEntry->isDeleted()); + RYU_ASSERT(newCatalogEntry->isDeleted()); if (catalogEntry.hasParent()) { return; } @@ -168,7 +168,7 @@ void Transaction::pushAlterCatalogEntry(CatalogSet& catalogSet, CatalogEntry& ca undoBuffer->createCatalogEntry(catalogSet, catalogEntry); hasCatalogChanges = true; if (shouldLogToWAL()) { - KU_ASSERT(localWAL); + RYU_ASSERT(localWAL); localWAL->logAlterCatalogEntryRecord(&alterInfo); } } @@ -178,7 +178,7 @@ void Transaction::pushSequenceChange(SequenceCatalogEntry* sequenceEntry, int64_ undoBuffer->createSequenceChange(*sequenceEntry, data); hasCatalogChanges = true; if (shouldLogToWAL()) { - KU_ASSERT(localWAL); + RYU_ASSERT(localWAL); localWAL->logUpdateSequenceRecord(sequenceEntry->getOID(), kCount); } } diff --git a/src/transaction/transaction_context.cpp b/src/transaction/transaction_context.cpp index dc4284b855..6c779e8b0f 100644 --- a/src/transaction/transaction_context.cpp +++ b/src/transaction/transaction_context.cpp @@ -45,7 +45,7 @@ void TransactionContext::beginRecoveryTransaction() { } void TransactionContext::validateManualTransaction(bool readOnlyStatement) const { - KU_ASSERT(hasActiveTransaction()); + RYU_ASSERT(hasActiveTransaction()); if (activeTransaction->isReadOnly() && !readOnlyStatement) { throw TransactionManagerException( "Can not execute a write query inside a read-only transaction."); @@ -79,7 +79,7 @@ TransactionContext* TransactionContext::Get(const main::ClientContext& context) } void TransactionContext::beginTransactionInternal(TransactionType transactionType) { - KU_ASSERT(!activeTransaction); + RYU_ASSERT(!activeTransaction); activeTransaction = clientContext.getDatabase()->getTransactionManager()->beginTransaction( clientContext, transactionType); } diff --git a/src/transaction/transaction_manager.cpp b/src/transaction/transaction_manager.cpp index 216b8c2a49..538a57c9fb 100644 --- a/src/transaction/transaction_manager.cpp +++ b/src/transaction/transaction_manager.cpp @@ -147,7 +147,7 @@ bool TransactionManager::hasActiveWriteTransactionNoLock() const { } void TransactionManager::clearTransactionNoLock(transaction_t transactionID) { - KU_ASSERT(std::ranges::any_of(activeTransactions.begin(), activeTransactions.end(), + RYU_ASSERT(std::ranges::any_of(activeTransactions.begin(), activeTransactions.end(), [transactionID](const auto& activeTransaction) { return activeTransaction->getID() == transactionID; })); diff --git a/test/api/udf_test.cpp b/test/api/udf_test.cpp index 9e4b9ebcf3..f3fa11d639 100644 --- a/test/api/udf_test.cpp +++ b/test/api/udf_test.cpp @@ -363,7 +363,7 @@ TEST_F(ApiTest, TernaryUDFMoreParamType) { static void addFour(const std::vector>& parameters, const std::vector& parameterSelVectors, common::ValueVector& result, common::SelectionVector*, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(parameters.size() == 1); + RYU_ASSERT(parameters.size() == 1); const auto& parameter = *parameters[0]; const auto& parameterSelVector = *parameterSelVectors[0]; result.resetAuxiliaryBuffer(); @@ -396,7 +396,7 @@ struct AddDate { static void addDate(const std::vector>& parameters, const std::vector& parameterSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* /*dataPtr*/ = nullptr) { - KU_ASSERT(parameters.size() == 2); + RYU_ASSERT(parameters.size() == 2); function::BinaryFunctionExecutor::execute(*parameters[0], parameterSelVectors[0], *parameters[1], parameterSelVectors[1], result, resultSelVector); } @@ -442,7 +442,7 @@ struct ConditionalConcat { static void conditionalConcat(const std::vector>& parameters, const std::vector& parameterSelVectors, common::ValueVector& result, common::SelectionVector* resultSelVector, void* dataPtr = nullptr) { - KU_ASSERT(parameters.size() == 3); + RYU_ASSERT(parameters.size() == 3); function::TernaryFunctionExecutor::executeSwitch(*parameters[0], parameterSelVectors[0], *parameters[1], parameterSelVectors[1], *parameters[2], diff --git a/test/c_api/database_test.cpp b/test/c_api/database_test.cpp index 50580d9d37..d3fac3a4b2 100644 --- a/test/c_api/database_test.cpp +++ b/test/c_api/database_test.cpp @@ -7,7 +7,7 @@ using namespace ryu::testing; // This class starts database without initializing graph. class APIEmptyDBTest : public BaseGraphTest { - std::string getInputDir() override { KU_UNREACHABLE; } + std::string getInputDir() override { RYU_UNREACHABLE; } }; class CApiDatabaseTest : public APIEmptyDBTest { diff --git a/test/copy/copy_test.cpp b/test/copy/copy_test.cpp index 1ecfb8c229..74c60ba754 100644 --- a/test/copy/copy_test.cpp +++ b/test/copy/copy_test.cpp @@ -109,7 +109,7 @@ class CopyTest : public BaseGraphTest { conn = std::make_unique(database.get()); currentBM->setClientContext(conn->getClientContext()); } - std::string getInputDir() override { KU_UNREACHABLE; } + std::string getInputDir() override { RYU_UNREACHABLE; } void BMExceptionRecoveryTest(BMExceptionRecoveryTestConfig cfg); std::atomic failureFrequency; FlakyBufferManager* currentBM; diff --git a/test/graph_test/base_graph_test.cpp b/test/graph_test/base_graph_test.cpp index 54daaf321f..176f87f754 100644 --- a/test/graph_test/base_graph_test.cpp +++ b/test/graph_test/base_graph_test.cpp @@ -44,7 +44,7 @@ void BaseGraphTest::createDBAndConn() { void BaseGraphTest::initGraph(const std::string& datasetDir) const { Connection* connection = conn ? conn.get() : (connMap.begin()->second).get(); - KU_ASSERT_UNCONDITIONAL(connection != nullptr); + RYU_ASSERT_UNCONDITIONAL(connection != nullptr); if (TestHelper::E2E_OVERRIDE_IMPORT_DIR.empty()) { TestHelper::executeScript(datasetDir + TestHelper::SCHEMA_FILE_NAME, *connection); diff --git a/test/include/graph_test/private_graph_test.h b/test/include/graph_test/private_graph_test.h index 1687229be7..8dc5e385a4 100644 --- a/test/include/graph_test/private_graph_test.h +++ b/test/include/graph_test/private_graph_test.h @@ -39,7 +39,7 @@ class PrivateGraphTest : public BaseGraphTest { // This class starts database without initializing graph. class EmptyDBTest : public PrivateGraphTest { - std::string getInputDir() override { KU_UNREACHABLE; } + std::string getInputDir() override { RYU_UNREACHABLE; } }; // ConcurrentTestExecutor is not thread safe diff --git a/test/storage/compress_chunk_test.cpp b/test/storage/compress_chunk_test.cpp index 559a5686ba..5077e7a65b 100644 --- a/test/storage/compress_chunk_test.cpp +++ b/test/storage/compress_chunk_test.cpp @@ -450,7 +450,7 @@ TEST_F(CompressChunkTest, TestDoubleInPlaceUpdateNoExceptions) { // finalize after each update so that we can still update in place if (state.metadata.compMeta.compression == CompressionType::ALP) { - KU_ASSERT(nullptr != state.getExceptionChunk()); + RYU_ASSERT(nullptr != state.getExceptionChunk()); state.getExceptionChunk()->finalizeAndFlushToDisk(state); } @@ -468,7 +468,7 @@ TEST_F(CompressChunkTest, TestDoubleInPlaceUpdateNoExceptions) { // finalize after each update so that we can still update in place if (state.metadata.compMeta.compression == CompressionType::ALP) { - KU_ASSERT(nullptr != state.getExceptionChunk()); + RYU_ASSERT(nullptr != state.getExceptionChunk()); state.getExceptionChunk()->finalizeAndFlushToDisk(state); } } diff --git a/test/storage/compression_test.cpp b/test/storage/compression_test.cpp index 519157040f..9421039ac8 100644 --- a/test/storage/compression_test.cpp +++ b/test/storage/compression_test.cpp @@ -19,9 +19,9 @@ using namespace ryu::storage; */ TEST(CompressionTests, TestStorageValueEquality) { - KU_ASSERT(StorageValue{-1} == StorageValue{-2 + 1}); - KU_ASSERT(StorageValue{5} == StorageValue{5U}); - KU_ASSERT( + RYU_ASSERT(StorageValue{-1} == StorageValue{-2 + 1}); + RYU_ASSERT(StorageValue{5} == StorageValue{5U}); + RYU_ASSERT( StorageValue{1} == StorageValue{StorageValue{(int128_t{1} << 100)}.get() >> 100}); } diff --git a/test/test_runner/test_runner.cpp b/test/test_runner/test_runner.cpp index 5f874de64a..2f2092da6f 100644 --- a/test/test_runner/test_runner.cpp +++ b/test/test_runner/test_runner.cpp @@ -361,7 +361,7 @@ std::string TestRunner::convertResultColumnsToString(const QueryResult& queryRes std::unique_ptr TestRunner::getLogicalPlan(const std::string& query, Connection& conn) { const auto preparedStatement = conn.prepare(query); - KU_ASSERT(preparedStatement->isSuccess()); + RYU_ASSERT(preparedStatement->isSuccess()); auto cachedStatement = conn.getClientContext()->getCachedPreparedStatementManager().getCachedStatement( preparedStatement->getName()); diff --git a/third_party/antlr4_cypher/cypher_parser.cpp b/third_party/antlr4_cypher/cypher_parser.cpp index 1bff0da747..a7c32b90cc 100644 --- a/third_party/antlr4_cypher/cypher_parser.cpp +++ b/third_party/antlr4_cypher/cypher_parser.cpp @@ -51,53 +51,53 @@ void cypherParserInitialize() { #endif auto staticData = std::make_unique( std::vector{ - "ku_Statements", "oC_Cypher", "oC_Statement", "kU_CopyFrom", "kU_ColumnNames", - "kU_ScanSource", "kU_CopyFromByColumn", "kU_CopyTO", "kU_ExportDatabase", - "kU_ImportDatabase", "kU_AttachDatabase", "kU_Option", "kU_Options", - "kU_DetachDatabase", "kU_UseDatabase", "kU_StandaloneCall", "kU_CommentOn", - "kU_CreateMacro", "kU_PositionalArgs", "kU_DefaultArg", "kU_FilePaths", - "kU_IfNotExists", "kU_CreateNodeTable", "kU_CreateRelTable", "kU_FromToConnections", - "kU_FromToConnection", "kU_CreateSequence", "kU_CreateType", "kU_SequenceOptions", - "kU_WithPasswd", "kU_CreateUser", "kU_CreateRole", "kU_IncrementBy", - "kU_MinValue", "kU_MaxValue", "kU_StartWith", "kU_Cycle", "kU_IfExists", - "kU_Drop", "kU_AlterTable", "kU_AlterOptions", "kU_AddProperty", "kU_Default", - "kU_DropProperty", "kU_RenameTable", "kU_RenameProperty", "kU_AddFromToConnection", - "kU_DropFromToConnection", "kU_ColumnDefinitions", "kU_ColumnDefinition", - "kU_PropertyDefinitions", "kU_PropertyDefinition", "kU_CreateNodeConstraint", - "kU_UnionType", "kU_StructType", "kU_MapType", "kU_DecimalType", "kU_DataType", - "kU_ListIdentifiers", "kU_ListIdentifier", "oC_AnyCypherOption", "oC_Explain", - "oC_Profile", "kU_Transaction", "kU_Extension", "kU_LoadExtension", - "kU_InstallExtension", "kU_UninstallExtension", "kU_UpdateExtension", + "ku_Statements", "oC_Cypher", "oC_Statement", "rU_CopyFrom", "rU_ColumnNames", + "rU_ScanSource", "rU_CopyFromByColumn", "rU_CopyTO", "rU_ExportDatabase", + "rU_ImportDatabase", "rU_AttachDatabase", "rU_Option", "rU_Options", + "rU_DetachDatabase", "rU_UseDatabase", "rU_StandaloneCall", "rU_CommentOn", + "rU_CreateMacro", "rU_PositionalArgs", "rU_DefaultArg", "rU_FilePaths", + "rU_IfNotExists", "rU_CreateNodeTable", "rU_CreateRelTable", "rU_FromToConnections", + "rU_FromToConnection", "rU_CreateSequence", "rU_CreateType", "rU_SequenceOptions", + "rU_WithPasswd", "rU_CreateUser", "rU_CreateRole", "rU_IncrementBy", + "rU_MinValue", "rU_MaxValue", "rU_StartWith", "rU_Cycle", "rU_IfExists", + "rU_Drop", "rU_AlterTable", "rU_AlterOptions", "rU_AddProperty", "rU_Default", + "rU_DropProperty", "rU_RenameTable", "rU_RenameProperty", "rU_AddFromToConnection", + "rU_DropFromToConnection", "rU_ColumnDefinitions", "rU_ColumnDefinition", + "rU_PropertyDefinitions", "rU_PropertyDefinition", "rU_CreateNodeConstraint", + "rU_UnionType", "rU_StructType", "rU_MapType", "rU_DecimalType", "rU_DataType", + "rU_ListIdentifiers", "rU_ListIdentifier", "oC_AnyCypherOption", "oC_Explain", + "oC_Profile", "rU_Transaction", "rU_Extension", "rU_LoadExtension", + "rU_InstallExtension", "rU_UninstallExtension", "rU_UpdateExtension", "oC_Query", "oC_RegularQuery", "oC_Union", "oC_SingleQuery", "oC_SinglePartQuery", - "oC_MultiPartQuery", "kU_QueryPart", "oC_UpdatingClause", "oC_ReadingClause", - "kU_LoadFrom", "oC_YieldItem", "oC_YieldItems", "kU_InQueryCall", - "oC_Match", "kU_Hint", "kU_JoinNode", "oC_Unwind", "oC_Create", "oC_Merge", + "oC_MultiPartQuery", "rU_QueryPart", "oC_UpdatingClause", "oC_ReadingClause", + "rU_LoadFrom", "oC_YieldItem", "oC_YieldItems", "rU_InQueryCall", + "oC_Match", "rU_Hint", "rU_JoinNode", "oC_Unwind", "oC_Create", "oC_Merge", "oC_MergeAction", "oC_Set", "oC_SetItem", "oC_Delete", "oC_With", "oC_Return", "oC_ProjectionBody", "oC_ProjectionItems", "oC_ProjectionItem", "oC_Order", "oC_Skip", "oC_Limit", "oC_SortItem", "oC_Where", "oC_Pattern", "oC_PatternPart", "oC_AnonymousPatternPart", "oC_PatternElement", "oC_NodePattern", "oC_PatternElementChain", "oC_RelationshipPattern", - "oC_RelationshipDetail", "kU_Properties", "oC_RelationshipTypes", - "oC_NodeLabels", "kU_RecursiveDetail", "kU_RecursiveType", "oC_RangeLiteral", - "kU_RecursiveComprehension", "kU_RecursiveProjectionItems", "oC_LowerBound", + "oC_RelationshipDetail", "rU_Properties", "oC_RelationshipTypes", + "oC_NodeLabels", "rU_RecursiveDetail", "rU_RecursiveType", "oC_RangeLiteral", + "rU_RecursiveComprehension", "rU_RecursiveProjectionItems", "oC_LowerBound", "oC_UpperBound", "oC_LabelName", "oC_RelTypeName", "oC_Expression", "oC_OrExpression", "oC_XorExpression", "oC_AndExpression", "oC_NotExpression", - "oC_ComparisonExpression", "kU_ComparisonOperator", "kU_BitwiseOrOperatorExpression", - "kU_BitwiseAndOperatorExpression", "kU_BitShiftOperatorExpression", - "kU_BitShiftOperator", "oC_AddOrSubtractExpression", "kU_AddOrSubtractOperator", - "oC_MultiplyDivideModuloExpression", "kU_MultiplyDivideModuloOperator", + "oC_ComparisonExpression", "rU_ComparisonOperator", "rU_BitwiseOrOperatorExpression", + "rU_BitwiseAndOperatorExpression", "rU_BitShiftOperatorExpression", + "rU_BitShiftOperator", "oC_AddOrSubtractExpression", "rU_AddOrSubtractOperator", + "oC_MultiplyDivideModuloExpression", "rU_MultiplyDivideModuloOperator", "oC_PowerOfExpression", "oC_StringListNullOperatorExpression", "oC_ListOperatorExpression", "oC_StringOperatorExpression", "oC_RegularExpression", "oC_NullOperatorExpression", "oC_UnaryAddSubtractOrFactorialExpression", "oC_PropertyOrLabelsExpression", "oC_Atom", "oC_Quantifier", "oC_FilterExpression", "oC_IdInColl", - "oC_Literal", "oC_BooleanLiteral", "oC_ListLiteral", "kU_ListEntry", - "kU_StructLiteral", "kU_StructField", "oC_ParenthesizedExpression", - "oC_FunctionInvocation", "oC_FunctionName", "kU_FunctionParameter", - "kU_LambdaParameter", "kU_LambdaVars", "oC_PathPatterns", "oC_ExistCountSubquery", + "oC_Literal", "oC_BooleanLiteral", "oC_ListLiteral", "rU_ListEntry", + "rU_StructLiteral", "rU_StructField", "oC_ParenthesizedExpression", + "oC_FunctionInvocation", "oC_FunctionName", "rU_FunctionParameter", + "rU_LambdaParameter", "rU_LambdaVars", "oC_PathPatterns", "oC_ExistCountSubquery", "oC_PropertyLookup", "oC_CaseExpression", "oC_CaseAlternative", "oC_Variable", "oC_NumberLiteral", "oC_Parameter", "oC_PropertyExpression", "oC_PropertyKeyName", "oC_IntegerLiteral", "oC_DoubleLiteral", "oC_SchemaName", "oC_SymbolicName", - "kU_NonReservedKeywords", "oC_LeftArrowHead", "oC_RightArrowHead", + "rU_NonReservedKeywords", "oC_LeftArrowHead", "oC_RightArrowHead", "oC_Dash" }, std::vector{ @@ -1565,88 +1565,88 @@ CypherParser::OC_QueryContext* CypherParser::OC_StatementContext::oC_Query() { return getRuleContext(0); } -CypherParser::KU_CreateUserContext* CypherParser::OC_StatementContext::kU_CreateUser() { - return getRuleContext(0); +CypherParser::RU_CreateUserContext* CypherParser::OC_StatementContext::rU_CreateUser() { + return getRuleContext(0); } -CypherParser::KU_CreateRoleContext* CypherParser::OC_StatementContext::kU_CreateRole() { - return getRuleContext(0); +CypherParser::RU_CreateRoleContext* CypherParser::OC_StatementContext::rU_CreateRole() { + return getRuleContext(0); } -CypherParser::KU_CreateNodeTableContext* CypherParser::OC_StatementContext::kU_CreateNodeTable() { - return getRuleContext(0); +CypherParser::RU_CreateNodeTableContext* CypherParser::OC_StatementContext::rU_CreateNodeTable() { + return getRuleContext(0); } -CypherParser::KU_CreateRelTableContext* CypherParser::OC_StatementContext::kU_CreateRelTable() { - return getRuleContext(0); +CypherParser::RU_CreateRelTableContext* CypherParser::OC_StatementContext::rU_CreateRelTable() { + return getRuleContext(0); } -CypherParser::KU_CreateSequenceContext* CypherParser::OC_StatementContext::kU_CreateSequence() { - return getRuleContext(0); +CypherParser::RU_CreateSequenceContext* CypherParser::OC_StatementContext::rU_CreateSequence() { + return getRuleContext(0); } -CypherParser::KU_CreateTypeContext* CypherParser::OC_StatementContext::kU_CreateType() { - return getRuleContext(0); +CypherParser::RU_CreateTypeContext* CypherParser::OC_StatementContext::rU_CreateType() { + return getRuleContext(0); } -CypherParser::KU_DropContext* CypherParser::OC_StatementContext::kU_Drop() { - return getRuleContext(0); +CypherParser::RU_DropContext* CypherParser::OC_StatementContext::rU_Drop() { + return getRuleContext(0); } -CypherParser::KU_AlterTableContext* CypherParser::OC_StatementContext::kU_AlterTable() { - return getRuleContext(0); +CypherParser::RU_AlterTableContext* CypherParser::OC_StatementContext::rU_AlterTable() { + return getRuleContext(0); } -CypherParser::KU_CopyFromContext* CypherParser::OC_StatementContext::kU_CopyFrom() { - return getRuleContext(0); +CypherParser::RU_CopyFromContext* CypherParser::OC_StatementContext::rU_CopyFrom() { + return getRuleContext(0); } -CypherParser::KU_CopyFromByColumnContext* CypherParser::OC_StatementContext::kU_CopyFromByColumn() { - return getRuleContext(0); +CypherParser::RU_CopyFromByColumnContext* CypherParser::OC_StatementContext::rU_CopyFromByColumn() { + return getRuleContext(0); } -CypherParser::KU_CopyTOContext* CypherParser::OC_StatementContext::kU_CopyTO() { - return getRuleContext(0); +CypherParser::RU_CopyTOContext* CypherParser::OC_StatementContext::rU_CopyTO() { + return getRuleContext(0); } -CypherParser::KU_StandaloneCallContext* CypherParser::OC_StatementContext::kU_StandaloneCall() { - return getRuleContext(0); +CypherParser::RU_StandaloneCallContext* CypherParser::OC_StatementContext::rU_StandaloneCall() { + return getRuleContext(0); } -CypherParser::KU_CreateMacroContext* CypherParser::OC_StatementContext::kU_CreateMacro() { - return getRuleContext(0); +CypherParser::RU_CreateMacroContext* CypherParser::OC_StatementContext::rU_CreateMacro() { + return getRuleContext(0); } -CypherParser::KU_CommentOnContext* CypherParser::OC_StatementContext::kU_CommentOn() { - return getRuleContext(0); +CypherParser::RU_CommentOnContext* CypherParser::OC_StatementContext::rU_CommentOn() { + return getRuleContext(0); } -CypherParser::KU_TransactionContext* CypherParser::OC_StatementContext::kU_Transaction() { - return getRuleContext(0); +CypherParser::RU_TransactionContext* CypherParser::OC_StatementContext::rU_Transaction() { + return getRuleContext(0); } -CypherParser::KU_ExtensionContext* CypherParser::OC_StatementContext::kU_Extension() { - return getRuleContext(0); +CypherParser::RU_ExtensionContext* CypherParser::OC_StatementContext::rU_Extension() { + return getRuleContext(0); } -CypherParser::KU_ExportDatabaseContext* CypherParser::OC_StatementContext::kU_ExportDatabase() { - return getRuleContext(0); +CypherParser::RU_ExportDatabaseContext* CypherParser::OC_StatementContext::rU_ExportDatabase() { + return getRuleContext(0); } -CypherParser::KU_ImportDatabaseContext* CypherParser::OC_StatementContext::kU_ImportDatabase() { - return getRuleContext(0); +CypherParser::RU_ImportDatabaseContext* CypherParser::OC_StatementContext::rU_ImportDatabase() { + return getRuleContext(0); } -CypherParser::KU_AttachDatabaseContext* CypherParser::OC_StatementContext::kU_AttachDatabase() { - return getRuleContext(0); +CypherParser::RU_AttachDatabaseContext* CypherParser::OC_StatementContext::rU_AttachDatabase() { + return getRuleContext(0); } -CypherParser::KU_DetachDatabaseContext* CypherParser::OC_StatementContext::kU_DetachDatabase() { - return getRuleContext(0); +CypherParser::RU_DetachDatabaseContext* CypherParser::OC_StatementContext::rU_DetachDatabase() { + return getRuleContext(0); } -CypherParser::KU_UseDatabaseContext* CypherParser::OC_StatementContext::kU_UseDatabase() { - return getRuleContext(0); +CypherParser::RU_UseDatabaseContext* CypherParser::OC_StatementContext::rU_UseDatabase() { + return getRuleContext(0); } @@ -1680,147 +1680,147 @@ CypherParser::OC_StatementContext* CypherParser::oC_Statement() { case 2: { enterOuterAlt(_localctx, 2); setState(391); - kU_CreateUser(); + rU_CreateUser(); break; } case 3: { enterOuterAlt(_localctx, 3); setState(392); - kU_CreateRole(); + rU_CreateRole(); break; } case 4: { enterOuterAlt(_localctx, 4); setState(393); - kU_CreateNodeTable(); + rU_CreateNodeTable(); break; } case 5: { enterOuterAlt(_localctx, 5); setState(394); - kU_CreateRelTable(); + rU_CreateRelTable(); break; } case 6: { enterOuterAlt(_localctx, 6); setState(395); - kU_CreateSequence(); + rU_CreateSequence(); break; } case 7: { enterOuterAlt(_localctx, 7); setState(396); - kU_CreateType(); + rU_CreateType(); break; } case 8: { enterOuterAlt(_localctx, 8); setState(397); - kU_Drop(); + rU_Drop(); break; } case 9: { enterOuterAlt(_localctx, 9); setState(398); - kU_AlterTable(); + rU_AlterTable(); break; } case 10: { enterOuterAlt(_localctx, 10); setState(399); - kU_CopyFrom(); + rU_CopyFrom(); break; } case 11: { enterOuterAlt(_localctx, 11); setState(400); - kU_CopyFromByColumn(); + rU_CopyFromByColumn(); break; } case 12: { enterOuterAlt(_localctx, 12); setState(401); - kU_CopyTO(); + rU_CopyTO(); break; } case 13: { enterOuterAlt(_localctx, 13); setState(402); - kU_StandaloneCall(); + rU_StandaloneCall(); break; } case 14: { enterOuterAlt(_localctx, 14); setState(403); - kU_CreateMacro(); + rU_CreateMacro(); break; } case 15: { enterOuterAlt(_localctx, 15); setState(404); - kU_CommentOn(); + rU_CommentOn(); break; } case 16: { enterOuterAlt(_localctx, 16); setState(405); - kU_Transaction(); + rU_Transaction(); break; } case 17: { enterOuterAlt(_localctx, 17); setState(406); - kU_Extension(); + rU_Extension(); break; } case 18: { enterOuterAlt(_localctx, 18); setState(407); - kU_ExportDatabase(); + rU_ExportDatabase(); break; } case 19: { enterOuterAlt(_localctx, 19); setState(408); - kU_ImportDatabase(); + rU_ImportDatabase(); break; } case 20: { enterOuterAlt(_localctx, 20); setState(409); - kU_AttachDatabase(); + rU_AttachDatabase(); break; } case 21: { enterOuterAlt(_localctx, 21); setState(410); - kU_DetachDatabase(); + rU_DetachDatabase(); break; } case 22: { enterOuterAlt(_localctx, 22); setState(411); - kU_UseDatabase(); + rU_UseDatabase(); break; } @@ -1838,53 +1838,53 @@ CypherParser::OC_StatementContext* CypherParser::oC_Statement() { return _localctx; } -//----------------- KU_CopyFromContext ------------------------------------------------------------------ +//----------------- RU_CopyFromContext ------------------------------------------------------------------ -CypherParser::KU_CopyFromContext::KU_CopyFromContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CopyFromContext::RU_CopyFromContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CopyFromContext::COPY() { +tree::TerminalNode* CypherParser::RU_CopyFromContext::COPY() { return getToken(CypherParser::COPY, 0); } -std::vector CypherParser::KU_CopyFromContext::SP() { +std::vector CypherParser::RU_CopyFromContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CopyFromContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CopyFromContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_CopyFromContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_CopyFromContext::oC_SchemaName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CopyFromContext::FROM() { +tree::TerminalNode* CypherParser::RU_CopyFromContext::FROM() { return getToken(CypherParser::FROM, 0); } -CypherParser::KU_ScanSourceContext* CypherParser::KU_CopyFromContext::kU_ScanSource() { - return getRuleContext(0); +CypherParser::RU_ScanSourceContext* CypherParser::RU_CopyFromContext::rU_ScanSource() { + return getRuleContext(0); } -CypherParser::KU_ColumnNamesContext* CypherParser::KU_CopyFromContext::kU_ColumnNames() { - return getRuleContext(0); +CypherParser::RU_ColumnNamesContext* CypherParser::RU_CopyFromContext::rU_ColumnNames() { + return getRuleContext(0); } -CypherParser::KU_OptionsContext* CypherParser::KU_CopyFromContext::kU_Options() { - return getRuleContext(0); +CypherParser::RU_OptionsContext* CypherParser::RU_CopyFromContext::rU_Options() { + return getRuleContext(0); } -size_t CypherParser::KU_CopyFromContext::getRuleIndex() const { - return CypherParser::RuleKU_CopyFrom; +size_t CypherParser::RU_CopyFromContext::getRuleIndex() const { + return CypherParser::RuleRU_CopyFrom; } -CypherParser::KU_CopyFromContext* CypherParser::kU_CopyFrom() { - KU_CopyFromContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 6, CypherParser::RuleKU_CopyFrom); +CypherParser::RU_CopyFromContext* CypherParser::rU_CopyFrom() { + RU_CopyFromContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 6, CypherParser::RuleRU_CopyFrom); size_t _la = 0; #if __cplusplus > 201703L @@ -1908,7 +1908,7 @@ CypherParser::KU_CopyFromContext* CypherParser::kU_CopyFrom() { switch (getInterpreter()->adaptivePredict(_input, 9, _ctx)) { case 1: { setState(417); - kU_ColumnNames(); + rU_ColumnNames(); break; } @@ -1922,7 +1922,7 @@ CypherParser::KU_CopyFromContext* CypherParser::kU_CopyFrom() { setState(422); match(CypherParser::SP); setState(423); - kU_ScanSource(); + rU_ScanSource(); setState(437); _errHandler->sync(this); @@ -1947,7 +1947,7 @@ CypherParser::KU_CopyFromContext* CypherParser::kU_CopyFrom() { match(CypherParser::SP); } setState(431); - kU_Options(); + rU_Options(); setState(433); _errHandler->sync(this); @@ -1975,37 +1975,37 @@ CypherParser::KU_CopyFromContext* CypherParser::kU_CopyFrom() { return _localctx; } -//----------------- KU_ColumnNamesContext ------------------------------------------------------------------ +//----------------- RU_ColumnNamesContext ------------------------------------------------------------------ -CypherParser::KU_ColumnNamesContext::KU_ColumnNamesContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ColumnNamesContext::RU_ColumnNamesContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_ColumnNamesContext::SP() { +std::vector CypherParser::RU_ColumnNamesContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_ColumnNamesContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_ColumnNamesContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -std::vector CypherParser::KU_ColumnNamesContext::oC_SchemaName() { +std::vector CypherParser::RU_ColumnNamesContext::oC_SchemaName() { return getRuleContexts(); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_ColumnNamesContext::oC_SchemaName(size_t i) { +CypherParser::OC_SchemaNameContext* CypherParser::RU_ColumnNamesContext::oC_SchemaName(size_t i) { return getRuleContext(i); } -size_t CypherParser::KU_ColumnNamesContext::getRuleIndex() const { - return CypherParser::RuleKU_ColumnNames; +size_t CypherParser::RU_ColumnNamesContext::getRuleIndex() const { + return CypherParser::RuleRU_ColumnNames; } -CypherParser::KU_ColumnNamesContext* CypherParser::kU_ColumnNames() { - KU_ColumnNamesContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 8, CypherParser::RuleKU_ColumnNames); +CypherParser::RU_ColumnNamesContext* CypherParser::rU_ColumnNames() { + RU_ColumnNamesContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 8, CypherParser::RuleRU_ColumnNames); size_t _la = 0; #if __cplusplus > 201703L @@ -2098,53 +2098,53 @@ CypherParser::KU_ColumnNamesContext* CypherParser::kU_ColumnNames() { return _localctx; } -//----------------- KU_ScanSourceContext ------------------------------------------------------------------ +//----------------- RU_ScanSourceContext ------------------------------------------------------------------ -CypherParser::KU_ScanSourceContext::KU_ScanSourceContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ScanSourceContext::RU_ScanSourceContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::KU_FilePathsContext* CypherParser::KU_ScanSourceContext::kU_FilePaths() { - return getRuleContext(0); +CypherParser::RU_FilePathsContext* CypherParser::RU_ScanSourceContext::rU_FilePaths() { + return getRuleContext(0); } -CypherParser::OC_QueryContext* CypherParser::KU_ScanSourceContext::oC_Query() { +CypherParser::OC_QueryContext* CypherParser::RU_ScanSourceContext::oC_Query() { return getRuleContext(0); } -std::vector CypherParser::KU_ScanSourceContext::SP() { +std::vector CypherParser::RU_ScanSourceContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_ScanSourceContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_ScanSourceContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_ParameterContext* CypherParser::KU_ScanSourceContext::oC_Parameter() { +CypherParser::OC_ParameterContext* CypherParser::RU_ScanSourceContext::oC_Parameter() { return getRuleContext(0); } -CypherParser::OC_VariableContext* CypherParser::KU_ScanSourceContext::oC_Variable() { +CypherParser::OC_VariableContext* CypherParser::RU_ScanSourceContext::oC_Variable() { return getRuleContext(0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_ScanSourceContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_ScanSourceContext::oC_SchemaName() { return getRuleContext(0); } -CypherParser::OC_FunctionInvocationContext* CypherParser::KU_ScanSourceContext::oC_FunctionInvocation() { +CypherParser::OC_FunctionInvocationContext* CypherParser::RU_ScanSourceContext::oC_FunctionInvocation() { return getRuleContext(0); } -size_t CypherParser::KU_ScanSourceContext::getRuleIndex() const { - return CypherParser::RuleKU_ScanSource; +size_t CypherParser::RU_ScanSourceContext::getRuleIndex() const { + return CypherParser::RuleRU_ScanSource; } -CypherParser::KU_ScanSourceContext* CypherParser::kU_ScanSource() { - KU_ScanSourceContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 10, CypherParser::RuleKU_ScanSource); +CypherParser::RU_ScanSourceContext* CypherParser::rU_ScanSource() { + RU_ScanSourceContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 10, CypherParser::RuleRU_ScanSource); size_t _la = 0; #if __cplusplus > 201703L @@ -2161,7 +2161,7 @@ CypherParser::KU_ScanSourceContext* CypherParser::kU_ScanSource() { case 1: { enterOuterAlt(_localctx, 1); setState(467); - kU_FilePaths(); + rU_FilePaths(); break; } @@ -2246,57 +2246,57 @@ CypherParser::KU_ScanSourceContext* CypherParser::kU_ScanSource() { return _localctx; } -//----------------- KU_CopyFromByColumnContext ------------------------------------------------------------------ +//----------------- RU_CopyFromByColumnContext ------------------------------------------------------------------ -CypherParser::KU_CopyFromByColumnContext::KU_CopyFromByColumnContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CopyFromByColumnContext::RU_CopyFromByColumnContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CopyFromByColumnContext::COPY() { +tree::TerminalNode* CypherParser::RU_CopyFromByColumnContext::COPY() { return getToken(CypherParser::COPY, 0); } -std::vector CypherParser::KU_CopyFromByColumnContext::SP() { +std::vector CypherParser::RU_CopyFromByColumnContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CopyFromByColumnContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CopyFromByColumnContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_CopyFromByColumnContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_CopyFromByColumnContext::oC_SchemaName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CopyFromByColumnContext::FROM() { +tree::TerminalNode* CypherParser::RU_CopyFromByColumnContext::FROM() { return getToken(CypherParser::FROM, 0); } -std::vector CypherParser::KU_CopyFromByColumnContext::StringLiteral() { +std::vector CypherParser::RU_CopyFromByColumnContext::StringLiteral() { return getTokens(CypherParser::StringLiteral); } -tree::TerminalNode* CypherParser::KU_CopyFromByColumnContext::StringLiteral(size_t i) { +tree::TerminalNode* CypherParser::RU_CopyFromByColumnContext::StringLiteral(size_t i) { return getToken(CypherParser::StringLiteral, i); } -tree::TerminalNode* CypherParser::KU_CopyFromByColumnContext::BY() { +tree::TerminalNode* CypherParser::RU_CopyFromByColumnContext::BY() { return getToken(CypherParser::BY, 0); } -tree::TerminalNode* CypherParser::KU_CopyFromByColumnContext::COLUMN() { +tree::TerminalNode* CypherParser::RU_CopyFromByColumnContext::COLUMN() { return getToken(CypherParser::COLUMN, 0); } -size_t CypherParser::KU_CopyFromByColumnContext::getRuleIndex() const { - return CypherParser::RuleKU_CopyFromByColumn; +size_t CypherParser::RU_CopyFromByColumnContext::getRuleIndex() const { + return CypherParser::RuleRU_CopyFromByColumn; } -CypherParser::KU_CopyFromByColumnContext* CypherParser::kU_CopyFromByColumn() { - KU_CopyFromByColumnContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 12, CypherParser::RuleKU_CopyFromByColumn); +CypherParser::RU_CopyFromByColumnContext* CypherParser::rU_CopyFromByColumn() { + RU_CopyFromByColumnContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 12, CypherParser::RuleRU_CopyFromByColumn); size_t _la = 0; #if __cplusplus > 201703L @@ -2381,49 +2381,49 @@ CypherParser::KU_CopyFromByColumnContext* CypherParser::kU_CopyFromByColumn() { return _localctx; } -//----------------- KU_CopyTOContext ------------------------------------------------------------------ +//----------------- RU_CopyTOContext ------------------------------------------------------------------ -CypherParser::KU_CopyTOContext::KU_CopyTOContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CopyTOContext::RU_CopyTOContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CopyTOContext::COPY() { +tree::TerminalNode* CypherParser::RU_CopyTOContext::COPY() { return getToken(CypherParser::COPY, 0); } -std::vector CypherParser::KU_CopyTOContext::SP() { +std::vector CypherParser::RU_CopyTOContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CopyTOContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CopyTOContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_QueryContext* CypherParser::KU_CopyTOContext::oC_Query() { +CypherParser::OC_QueryContext* CypherParser::RU_CopyTOContext::oC_Query() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CopyTOContext::TO() { +tree::TerminalNode* CypherParser::RU_CopyTOContext::TO() { return getToken(CypherParser::TO, 0); } -tree::TerminalNode* CypherParser::KU_CopyTOContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_CopyTOContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -CypherParser::KU_OptionsContext* CypherParser::KU_CopyTOContext::kU_Options() { - return getRuleContext(0); +CypherParser::RU_OptionsContext* CypherParser::RU_CopyTOContext::rU_Options() { + return getRuleContext(0); } -size_t CypherParser::KU_CopyTOContext::getRuleIndex() const { - return CypherParser::RuleKU_CopyTO; +size_t CypherParser::RU_CopyTOContext::getRuleIndex() const { + return CypherParser::RuleRU_CopyTO; } -CypherParser::KU_CopyTOContext* CypherParser::kU_CopyTO() { - KU_CopyTOContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 14, CypherParser::RuleKU_CopyTO); +CypherParser::RU_CopyTOContext* CypherParser::rU_CopyTO() { + RU_CopyTOContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 14, CypherParser::RuleRU_CopyTO); size_t _la = 0; #if __cplusplus > 201703L @@ -2493,7 +2493,7 @@ CypherParser::KU_CopyTOContext* CypherParser::kU_CopyTO() { match(CypherParser::SP); } setState(542); - kU_Options(); + rU_Options(); setState(544); _errHandler->sync(this); @@ -2521,45 +2521,45 @@ CypherParser::KU_CopyTOContext* CypherParser::kU_CopyTO() { return _localctx; } -//----------------- KU_ExportDatabaseContext ------------------------------------------------------------------ +//----------------- RU_ExportDatabaseContext ------------------------------------------------------------------ -CypherParser::KU_ExportDatabaseContext::KU_ExportDatabaseContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ExportDatabaseContext::RU_ExportDatabaseContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_ExportDatabaseContext::EXPORT() { +tree::TerminalNode* CypherParser::RU_ExportDatabaseContext::EXPORT() { return getToken(CypherParser::EXPORT, 0); } -std::vector CypherParser::KU_ExportDatabaseContext::SP() { +std::vector CypherParser::RU_ExportDatabaseContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_ExportDatabaseContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_ExportDatabaseContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_ExportDatabaseContext::DATABASE() { +tree::TerminalNode* CypherParser::RU_ExportDatabaseContext::DATABASE() { return getToken(CypherParser::DATABASE, 0); } -tree::TerminalNode* CypherParser::KU_ExportDatabaseContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_ExportDatabaseContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -CypherParser::KU_OptionsContext* CypherParser::KU_ExportDatabaseContext::kU_Options() { - return getRuleContext(0); +CypherParser::RU_OptionsContext* CypherParser::RU_ExportDatabaseContext::rU_Options() { + return getRuleContext(0); } -size_t CypherParser::KU_ExportDatabaseContext::getRuleIndex() const { - return CypherParser::RuleKU_ExportDatabase; +size_t CypherParser::RU_ExportDatabaseContext::getRuleIndex() const { + return CypherParser::RuleRU_ExportDatabase; } -CypherParser::KU_ExportDatabaseContext* CypherParser::kU_ExportDatabase() { - KU_ExportDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 16, CypherParser::RuleKU_ExportDatabase); +CypherParser::RU_ExportDatabaseContext* CypherParser::rU_ExportDatabase() { + RU_ExportDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 16, CypherParser::RuleRU_ExportDatabase); size_t _la = 0; #if __cplusplus > 201703L @@ -2605,7 +2605,7 @@ CypherParser::KU_ExportDatabaseContext* CypherParser::kU_ExportDatabase() { match(CypherParser::SP); } setState(562); - kU_Options(); + rU_Options(); setState(564); _errHandler->sync(this); @@ -2633,41 +2633,41 @@ CypherParser::KU_ExportDatabaseContext* CypherParser::kU_ExportDatabase() { return _localctx; } -//----------------- KU_ImportDatabaseContext ------------------------------------------------------------------ +//----------------- RU_ImportDatabaseContext ------------------------------------------------------------------ -CypherParser::KU_ImportDatabaseContext::KU_ImportDatabaseContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ImportDatabaseContext::RU_ImportDatabaseContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_ImportDatabaseContext::IMPORT() { +tree::TerminalNode* CypherParser::RU_ImportDatabaseContext::IMPORT() { return getToken(CypherParser::IMPORT, 0); } -std::vector CypherParser::KU_ImportDatabaseContext::SP() { +std::vector CypherParser::RU_ImportDatabaseContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_ImportDatabaseContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_ImportDatabaseContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_ImportDatabaseContext::DATABASE() { +tree::TerminalNode* CypherParser::RU_ImportDatabaseContext::DATABASE() { return getToken(CypherParser::DATABASE, 0); } -tree::TerminalNode* CypherParser::KU_ImportDatabaseContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_ImportDatabaseContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -size_t CypherParser::KU_ImportDatabaseContext::getRuleIndex() const { - return CypherParser::RuleKU_ImportDatabase; +size_t CypherParser::RU_ImportDatabaseContext::getRuleIndex() const { + return CypherParser::RuleRU_ImportDatabase; } -CypherParser::KU_ImportDatabaseContext* CypherParser::kU_ImportDatabase() { - KU_ImportDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 18, CypherParser::RuleKU_ImportDatabase); +CypherParser::RU_ImportDatabaseContext* CypherParser::rU_ImportDatabase() { + RU_ImportDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 18, CypherParser::RuleRU_ImportDatabase); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2699,57 +2699,57 @@ CypherParser::KU_ImportDatabaseContext* CypherParser::kU_ImportDatabase() { return _localctx; } -//----------------- KU_AttachDatabaseContext ------------------------------------------------------------------ +//----------------- RU_AttachDatabaseContext ------------------------------------------------------------------ -CypherParser::KU_AttachDatabaseContext::KU_AttachDatabaseContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_AttachDatabaseContext::RU_AttachDatabaseContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_AttachDatabaseContext::ATTACH() { +tree::TerminalNode* CypherParser::RU_AttachDatabaseContext::ATTACH() { return getToken(CypherParser::ATTACH, 0); } -std::vector CypherParser::KU_AttachDatabaseContext::SP() { +std::vector CypherParser::RU_AttachDatabaseContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_AttachDatabaseContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_AttachDatabaseContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_AttachDatabaseContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_AttachDatabaseContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -tree::TerminalNode* CypherParser::KU_AttachDatabaseContext::DBTYPE() { +tree::TerminalNode* CypherParser::RU_AttachDatabaseContext::DBTYPE() { return getToken(CypherParser::DBTYPE, 0); } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_AttachDatabaseContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_AttachDatabaseContext::oC_SymbolicName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_AttachDatabaseContext::AS() { +tree::TerminalNode* CypherParser::RU_AttachDatabaseContext::AS() { return getToken(CypherParser::AS, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_AttachDatabaseContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_AttachDatabaseContext::oC_SchemaName() { return getRuleContext(0); } -CypherParser::KU_OptionsContext* CypherParser::KU_AttachDatabaseContext::kU_Options() { - return getRuleContext(0); +CypherParser::RU_OptionsContext* CypherParser::RU_AttachDatabaseContext::rU_Options() { + return getRuleContext(0); } -size_t CypherParser::KU_AttachDatabaseContext::getRuleIndex() const { - return CypherParser::RuleKU_AttachDatabase; +size_t CypherParser::RU_AttachDatabaseContext::getRuleIndex() const { + return CypherParser::RuleRU_AttachDatabase; } -CypherParser::KU_AttachDatabaseContext* CypherParser::kU_AttachDatabase() { - KU_AttachDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 20, CypherParser::RuleKU_AttachDatabase); +CypherParser::RU_AttachDatabaseContext* CypherParser::rU_AttachDatabase() { + RU_AttachDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 20, CypherParser::RuleRU_AttachDatabase); size_t _la = 0; #if __cplusplus > 201703L @@ -2828,7 +2828,7 @@ CypherParser::KU_AttachDatabaseContext* CypherParser::kU_AttachDatabase() { match(CypherParser::SP); } setState(600); - kU_Options(); + rU_Options(); break; } @@ -2856,37 +2856,37 @@ CypherParser::KU_AttachDatabaseContext* CypherParser::kU_AttachDatabase() { return _localctx; } -//----------------- KU_OptionContext ------------------------------------------------------------------ +//----------------- RU_OptionContext ------------------------------------------------------------------ -CypherParser::KU_OptionContext::KU_OptionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_OptionContext::RU_OptionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_OptionContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_OptionContext::oC_SymbolicName() { return getRuleContext(0); } -CypherParser::OC_LiteralContext* CypherParser::KU_OptionContext::oC_Literal() { +CypherParser::OC_LiteralContext* CypherParser::RU_OptionContext::oC_Literal() { return getRuleContext(0); } -std::vector CypherParser::KU_OptionContext::SP() { +std::vector CypherParser::RU_OptionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_OptionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_OptionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_OptionContext::getRuleIndex() const { - return CypherParser::RuleKU_Option; +size_t CypherParser::RU_OptionContext::getRuleIndex() const { + return CypherParser::RuleRU_Option; } -CypherParser::KU_OptionContext* CypherParser::kU_Option() { - KU_OptionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 22, CypherParser::RuleKU_Option); +CypherParser::RU_OptionContext* CypherParser::rU_Option() { + RU_OptionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 22, CypherParser::RuleRU_Option); size_t _la = 0; #if __cplusplus > 201703L @@ -2972,37 +2972,37 @@ CypherParser::KU_OptionContext* CypherParser::kU_Option() { return _localctx; } -//----------------- KU_OptionsContext ------------------------------------------------------------------ +//----------------- RU_OptionsContext ------------------------------------------------------------------ -CypherParser::KU_OptionsContext::KU_OptionsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_OptionsContext::RU_OptionsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_OptionsContext::kU_Option() { - return getRuleContexts(); +std::vector CypherParser::RU_OptionsContext::rU_Option() { + return getRuleContexts(); } -CypherParser::KU_OptionContext* CypherParser::KU_OptionsContext::kU_Option(size_t i) { - return getRuleContext(i); +CypherParser::RU_OptionContext* CypherParser::RU_OptionsContext::rU_Option(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_OptionsContext::SP() { +std::vector CypherParser::RU_OptionsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_OptionsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_OptionsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_OptionsContext::getRuleIndex() const { - return CypherParser::RuleKU_Options; +size_t CypherParser::RU_OptionsContext::getRuleIndex() const { + return CypherParser::RuleRU_Options; } -CypherParser::KU_OptionsContext* CypherParser::kU_Options() { - KU_OptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 24, CypherParser::RuleKU_Options); +CypherParser::RU_OptionsContext* CypherParser::rU_Options() { + RU_OptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 24, CypherParser::RuleRU_Options); size_t _la = 0; #if __cplusplus > 201703L @@ -3016,7 +3016,7 @@ CypherParser::KU_OptionsContext* CypherParser::kU_Options() { size_t alt; enterOuterAlt(_localctx, 1); setState(629); - kU_Option(); + rU_Option(); setState(640); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 52, _ctx); @@ -3041,7 +3041,7 @@ CypherParser::KU_OptionsContext* CypherParser::kU_Options() { match(CypherParser::SP); } setState(637); - kU_Option(); + rU_Option(); } setState(642); _errHandler->sync(this); @@ -3058,33 +3058,33 @@ CypherParser::KU_OptionsContext* CypherParser::kU_Options() { return _localctx; } -//----------------- KU_DetachDatabaseContext ------------------------------------------------------------------ +//----------------- RU_DetachDatabaseContext ------------------------------------------------------------------ -CypherParser::KU_DetachDatabaseContext::KU_DetachDatabaseContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DetachDatabaseContext::RU_DetachDatabaseContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_DetachDatabaseContext::DETACH() { +tree::TerminalNode* CypherParser::RU_DetachDatabaseContext::DETACH() { return getToken(CypherParser::DETACH, 0); } -tree::TerminalNode* CypherParser::KU_DetachDatabaseContext::SP() { +tree::TerminalNode* CypherParser::RU_DetachDatabaseContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_DetachDatabaseContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_DetachDatabaseContext::oC_SchemaName() { return getRuleContext(0); } -size_t CypherParser::KU_DetachDatabaseContext::getRuleIndex() const { - return CypherParser::RuleKU_DetachDatabase; +size_t CypherParser::RU_DetachDatabaseContext::getRuleIndex() const { + return CypherParser::RuleRU_DetachDatabase; } -CypherParser::KU_DetachDatabaseContext* CypherParser::kU_DetachDatabase() { - KU_DetachDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 26, CypherParser::RuleKU_DetachDatabase); +CypherParser::RU_DetachDatabaseContext* CypherParser::rU_DetachDatabase() { + RU_DetachDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 26, CypherParser::RuleRU_DetachDatabase); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3112,33 +3112,33 @@ CypherParser::KU_DetachDatabaseContext* CypherParser::kU_DetachDatabase() { return _localctx; } -//----------------- KU_UseDatabaseContext ------------------------------------------------------------------ +//----------------- RU_UseDatabaseContext ------------------------------------------------------------------ -CypherParser::KU_UseDatabaseContext::KU_UseDatabaseContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_UseDatabaseContext::RU_UseDatabaseContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_UseDatabaseContext::USE() { +tree::TerminalNode* CypherParser::RU_UseDatabaseContext::USE() { return getToken(CypherParser::USE, 0); } -tree::TerminalNode* CypherParser::KU_UseDatabaseContext::SP() { +tree::TerminalNode* CypherParser::RU_UseDatabaseContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_UseDatabaseContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_UseDatabaseContext::oC_SchemaName() { return getRuleContext(0); } -size_t CypherParser::KU_UseDatabaseContext::getRuleIndex() const { - return CypherParser::RuleKU_UseDatabase; +size_t CypherParser::RU_UseDatabaseContext::getRuleIndex() const { + return CypherParser::RuleRU_UseDatabase; } -CypherParser::KU_UseDatabaseContext* CypherParser::kU_UseDatabase() { - KU_UseDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 28, CypherParser::RuleKU_UseDatabase); +CypherParser::RU_UseDatabaseContext* CypherParser::rU_UseDatabase() { + RU_UseDatabaseContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 28, CypherParser::RuleRU_UseDatabase); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3166,45 +3166,45 @@ CypherParser::KU_UseDatabaseContext* CypherParser::kU_UseDatabase() { return _localctx; } -//----------------- KU_StandaloneCallContext ------------------------------------------------------------------ +//----------------- RU_StandaloneCallContext ------------------------------------------------------------------ -CypherParser::KU_StandaloneCallContext::KU_StandaloneCallContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_StandaloneCallContext::RU_StandaloneCallContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_StandaloneCallContext::CALL() { +tree::TerminalNode* CypherParser::RU_StandaloneCallContext::CALL() { return getToken(CypherParser::CALL, 0); } -std::vector CypherParser::KU_StandaloneCallContext::SP() { +std::vector CypherParser::RU_StandaloneCallContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_StandaloneCallContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_StandaloneCallContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_StandaloneCallContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_StandaloneCallContext::oC_SymbolicName() { return getRuleContext(0); } -CypherParser::OC_ExpressionContext* CypherParser::KU_StandaloneCallContext::oC_Expression() { +CypherParser::OC_ExpressionContext* CypherParser::RU_StandaloneCallContext::oC_Expression() { return getRuleContext(0); } -CypherParser::OC_FunctionInvocationContext* CypherParser::KU_StandaloneCallContext::oC_FunctionInvocation() { +CypherParser::OC_FunctionInvocationContext* CypherParser::RU_StandaloneCallContext::oC_FunctionInvocation() { return getRuleContext(0); } -size_t CypherParser::KU_StandaloneCallContext::getRuleIndex() const { - return CypherParser::RuleKU_StandaloneCall; +size_t CypherParser::RU_StandaloneCallContext::getRuleIndex() const { + return CypherParser::RuleRU_StandaloneCall; } -CypherParser::KU_StandaloneCallContext* CypherParser::kU_StandaloneCall() { - KU_StandaloneCallContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 30, CypherParser::RuleKU_StandaloneCall); +CypherParser::RU_StandaloneCallContext* CypherParser::rU_StandaloneCall() { + RU_StandaloneCallContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 30, CypherParser::RuleRU_StandaloneCall); size_t _la = 0; #if __cplusplus > 201703L @@ -3274,53 +3274,53 @@ CypherParser::KU_StandaloneCallContext* CypherParser::kU_StandaloneCall() { return _localctx; } -//----------------- KU_CommentOnContext ------------------------------------------------------------------ +//----------------- RU_CommentOnContext ------------------------------------------------------------------ -CypherParser::KU_CommentOnContext::KU_CommentOnContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CommentOnContext::RU_CommentOnContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CommentOnContext::COMMENT() { +tree::TerminalNode* CypherParser::RU_CommentOnContext::COMMENT() { return getToken(CypherParser::COMMENT, 0); } -std::vector CypherParser::KU_CommentOnContext::SP() { +std::vector CypherParser::RU_CommentOnContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CommentOnContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CommentOnContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CommentOnContext::ON() { +tree::TerminalNode* CypherParser::RU_CommentOnContext::ON() { return getToken(CypherParser::ON, 0); } -tree::TerminalNode* CypherParser::KU_CommentOnContext::TABLE() { +tree::TerminalNode* CypherParser::RU_CommentOnContext::TABLE() { return getToken(CypherParser::TABLE, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_CommentOnContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_CommentOnContext::oC_SchemaName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CommentOnContext::IS() { +tree::TerminalNode* CypherParser::RU_CommentOnContext::IS() { return getToken(CypherParser::IS, 0); } -tree::TerminalNode* CypherParser::KU_CommentOnContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_CommentOnContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -size_t CypherParser::KU_CommentOnContext::getRuleIndex() const { - return CypherParser::RuleKU_CommentOn; +size_t CypherParser::RU_CommentOnContext::getRuleIndex() const { + return CypherParser::RuleRU_CommentOn; } -CypherParser::KU_CommentOnContext* CypherParser::kU_CommentOn() { - KU_CommentOnContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 32, CypherParser::RuleKU_CommentOn); +CypherParser::RU_CommentOnContext* CypherParser::rU_CommentOn() { + RU_CommentOnContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 32, CypherParser::RuleRU_CommentOn); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3364,61 +3364,61 @@ CypherParser::KU_CommentOnContext* CypherParser::kU_CommentOn() { return _localctx; } -//----------------- KU_CreateMacroContext ------------------------------------------------------------------ +//----------------- RU_CreateMacroContext ------------------------------------------------------------------ -CypherParser::KU_CreateMacroContext::KU_CreateMacroContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateMacroContext::RU_CreateMacroContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateMacroContext::CREATE() { +tree::TerminalNode* CypherParser::RU_CreateMacroContext::CREATE() { return getToken(CypherParser::CREATE, 0); } -std::vector CypherParser::KU_CreateMacroContext::SP() { +std::vector CypherParser::RU_CreateMacroContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateMacroContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateMacroContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateMacroContext::MACRO() { +tree::TerminalNode* CypherParser::RU_CreateMacroContext::MACRO() { return getToken(CypherParser::MACRO, 0); } -CypherParser::OC_FunctionNameContext* CypherParser::KU_CreateMacroContext::oC_FunctionName() { +CypherParser::OC_FunctionNameContext* CypherParser::RU_CreateMacroContext::oC_FunctionName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CreateMacroContext::AS() { +tree::TerminalNode* CypherParser::RU_CreateMacroContext::AS() { return getToken(CypherParser::AS, 0); } -CypherParser::OC_ExpressionContext* CypherParser::KU_CreateMacroContext::oC_Expression() { +CypherParser::OC_ExpressionContext* CypherParser::RU_CreateMacroContext::oC_Expression() { return getRuleContext(0); } -CypherParser::KU_PositionalArgsContext* CypherParser::KU_CreateMacroContext::kU_PositionalArgs() { - return getRuleContext(0); +CypherParser::RU_PositionalArgsContext* CypherParser::RU_CreateMacroContext::rU_PositionalArgs() { + return getRuleContext(0); } -std::vector CypherParser::KU_CreateMacroContext::kU_DefaultArg() { - return getRuleContexts(); +std::vector CypherParser::RU_CreateMacroContext::rU_DefaultArg() { + return getRuleContexts(); } -CypherParser::KU_DefaultArgContext* CypherParser::KU_CreateMacroContext::kU_DefaultArg(size_t i) { - return getRuleContext(i); +CypherParser::RU_DefaultArgContext* CypherParser::RU_CreateMacroContext::rU_DefaultArg(size_t i) { + return getRuleContext(i); } -size_t CypherParser::KU_CreateMacroContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateMacro; +size_t CypherParser::RU_CreateMacroContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateMacro; } -CypherParser::KU_CreateMacroContext* CypherParser::kU_CreateMacro() { - KU_CreateMacroContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 34, CypherParser::RuleKU_CreateMacro); +CypherParser::RU_CreateMacroContext* CypherParser::rU_CreateMacro() { + RU_CreateMacroContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 34, CypherParser::RuleRU_CreateMacro); size_t _la = 0; #if __cplusplus > 201703L @@ -3470,7 +3470,7 @@ CypherParser::KU_CreateMacroContext* CypherParser::kU_CreateMacro() { switch (getInterpreter()->adaptivePredict(_input, 58, _ctx)) { case 1: { setState(692); - kU_PositionalArgs(); + rU_PositionalArgs(); break; } @@ -3499,7 +3499,7 @@ CypherParser::KU_CreateMacroContext* CypherParser::kU_CreateMacro() { ((1ULL << (_la - 65)) & -287985230644762313) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && ((1ULL << (_la - 130)) & 5068755015275819) != 0)) { setState(698); - kU_DefaultArg(); + rU_DefaultArg(); } setState(711); _errHandler->sync(this); @@ -3525,7 +3525,7 @@ CypherParser::KU_CreateMacroContext* CypherParser::kU_CreateMacro() { match(CypherParser::SP); } setState(708); - kU_DefaultArg(); + rU_DefaultArg(); } setState(713); _errHandler->sync(this); @@ -3560,37 +3560,37 @@ CypherParser::KU_CreateMacroContext* CypherParser::kU_CreateMacro() { return _localctx; } -//----------------- KU_PositionalArgsContext ------------------------------------------------------------------ +//----------------- RU_PositionalArgsContext ------------------------------------------------------------------ -CypherParser::KU_PositionalArgsContext::KU_PositionalArgsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_PositionalArgsContext::RU_PositionalArgsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_PositionalArgsContext::oC_SymbolicName() { +std::vector CypherParser::RU_PositionalArgsContext::oC_SymbolicName() { return getRuleContexts(); } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_PositionalArgsContext::oC_SymbolicName(size_t i) { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_PositionalArgsContext::oC_SymbolicName(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_PositionalArgsContext::SP() { +std::vector CypherParser::RU_PositionalArgsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_PositionalArgsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_PositionalArgsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_PositionalArgsContext::getRuleIndex() const { - return CypherParser::RuleKU_PositionalArgs; +size_t CypherParser::RU_PositionalArgsContext::getRuleIndex() const { + return CypherParser::RuleRU_PositionalArgs; } -CypherParser::KU_PositionalArgsContext* CypherParser::kU_PositionalArgs() { - KU_PositionalArgsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 36, CypherParser::RuleKU_PositionalArgs); +CypherParser::RU_PositionalArgsContext* CypherParser::rU_PositionalArgs() { + RU_PositionalArgsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 36, CypherParser::RuleRU_PositionalArgs); size_t _la = 0; #if __cplusplus > 201703L @@ -3646,41 +3646,41 @@ CypherParser::KU_PositionalArgsContext* CypherParser::kU_PositionalArgs() { return _localctx; } -//----------------- KU_DefaultArgContext ------------------------------------------------------------------ +//----------------- RU_DefaultArgContext ------------------------------------------------------------------ -CypherParser::KU_DefaultArgContext::KU_DefaultArgContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DefaultArgContext::RU_DefaultArgContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_DefaultArgContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_DefaultArgContext::oC_SymbolicName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_DefaultArgContext::COLON() { +tree::TerminalNode* CypherParser::RU_DefaultArgContext::COLON() { return getToken(CypherParser::COLON, 0); } -CypherParser::OC_LiteralContext* CypherParser::KU_DefaultArgContext::oC_Literal() { +CypherParser::OC_LiteralContext* CypherParser::RU_DefaultArgContext::oC_Literal() { return getRuleContext(0); } -std::vector CypherParser::KU_DefaultArgContext::SP() { +std::vector CypherParser::RU_DefaultArgContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_DefaultArgContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_DefaultArgContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_DefaultArgContext::getRuleIndex() const { - return CypherParser::RuleKU_DefaultArg; +size_t CypherParser::RU_DefaultArgContext::getRuleIndex() const { + return CypherParser::RuleRU_DefaultArg; } -CypherParser::KU_DefaultArgContext* CypherParser::kU_DefaultArg() { - KU_DefaultArgContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 38, CypherParser::RuleKU_DefaultArg); +CypherParser::RU_DefaultArgContext* CypherParser::rU_DefaultArg() { + RU_DefaultArgContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 38, CypherParser::RuleRU_DefaultArg); size_t _la = 0; #if __cplusplus > 201703L @@ -3727,41 +3727,41 @@ CypherParser::KU_DefaultArgContext* CypherParser::kU_DefaultArg() { return _localctx; } -//----------------- KU_FilePathsContext ------------------------------------------------------------------ +//----------------- RU_FilePathsContext ------------------------------------------------------------------ -CypherParser::KU_FilePathsContext::KU_FilePathsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_FilePathsContext::RU_FilePathsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_FilePathsContext::StringLiteral() { +std::vector CypherParser::RU_FilePathsContext::StringLiteral() { return getTokens(CypherParser::StringLiteral); } -tree::TerminalNode* CypherParser::KU_FilePathsContext::StringLiteral(size_t i) { +tree::TerminalNode* CypherParser::RU_FilePathsContext::StringLiteral(size_t i) { return getToken(CypherParser::StringLiteral, i); } -std::vector CypherParser::KU_FilePathsContext::SP() { +std::vector CypherParser::RU_FilePathsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_FilePathsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_FilePathsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_FilePathsContext::GLOB() { +tree::TerminalNode* CypherParser::RU_FilePathsContext::GLOB() { return getToken(CypherParser::GLOB, 0); } -size_t CypherParser::KU_FilePathsContext::getRuleIndex() const { - return CypherParser::RuleKU_FilePaths; +size_t CypherParser::RU_FilePathsContext::getRuleIndex() const { + return CypherParser::RuleRU_FilePaths; } -CypherParser::KU_FilePathsContext* CypherParser::kU_FilePaths() { - KU_FilePathsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 40, CypherParser::RuleKU_FilePaths); +CypherParser::RU_FilePathsContext* CypherParser::rU_FilePaths() { + RU_FilePathsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 40, CypherParser::RuleRU_FilePaths); size_t _la = 0; #if __cplusplus > 201703L @@ -3880,41 +3880,41 @@ CypherParser::KU_FilePathsContext* CypherParser::kU_FilePaths() { return _localctx; } -//----------------- KU_IfNotExistsContext ------------------------------------------------------------------ +//----------------- RU_IfNotExistsContext ------------------------------------------------------------------ -CypherParser::KU_IfNotExistsContext::KU_IfNotExistsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_IfNotExistsContext::RU_IfNotExistsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_IfNotExistsContext::IF() { +tree::TerminalNode* CypherParser::RU_IfNotExistsContext::IF() { return getToken(CypherParser::IF, 0); } -std::vector CypherParser::KU_IfNotExistsContext::SP() { +std::vector CypherParser::RU_IfNotExistsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_IfNotExistsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_IfNotExistsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_IfNotExistsContext::NOT() { +tree::TerminalNode* CypherParser::RU_IfNotExistsContext::NOT() { return getToken(CypherParser::NOT, 0); } -tree::TerminalNode* CypherParser::KU_IfNotExistsContext::EXISTS() { +tree::TerminalNode* CypherParser::RU_IfNotExistsContext::EXISTS() { return getToken(CypherParser::EXISTS, 0); } -size_t CypherParser::KU_IfNotExistsContext::getRuleIndex() const { - return CypherParser::RuleKU_IfNotExists; +size_t CypherParser::RU_IfNotExistsContext::getRuleIndex() const { + return CypherParser::RuleRU_IfNotExists; } -CypherParser::KU_IfNotExistsContext* CypherParser::kU_IfNotExists() { - KU_IfNotExistsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 42, CypherParser::RuleKU_IfNotExists); +CypherParser::RU_IfNotExistsContext* CypherParser::rU_IfNotExists() { + RU_IfNotExistsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 42, CypherParser::RuleRU_IfNotExists); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3946,65 +3946,65 @@ CypherParser::KU_IfNotExistsContext* CypherParser::kU_IfNotExists() { return _localctx; } -//----------------- KU_CreateNodeTableContext ------------------------------------------------------------------ +//----------------- RU_CreateNodeTableContext ------------------------------------------------------------------ -CypherParser::KU_CreateNodeTableContext::KU_CreateNodeTableContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateNodeTableContext::RU_CreateNodeTableContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateNodeTableContext::CREATE() { +tree::TerminalNode* CypherParser::RU_CreateNodeTableContext::CREATE() { return getToken(CypherParser::CREATE, 0); } -std::vector CypherParser::KU_CreateNodeTableContext::SP() { +std::vector CypherParser::RU_CreateNodeTableContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateNodeTableContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateNodeTableContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateNodeTableContext::NODE() { +tree::TerminalNode* CypherParser::RU_CreateNodeTableContext::NODE() { return getToken(CypherParser::NODE, 0); } -tree::TerminalNode* CypherParser::KU_CreateNodeTableContext::TABLE() { +tree::TerminalNode* CypherParser::RU_CreateNodeTableContext::TABLE() { return getToken(CypherParser::TABLE, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_CreateNodeTableContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_CreateNodeTableContext::oC_SchemaName() { return getRuleContext(0); } -CypherParser::KU_PropertyDefinitionsContext* CypherParser::KU_CreateNodeTableContext::kU_PropertyDefinitions() { - return getRuleContext(0); +CypherParser::RU_PropertyDefinitionsContext* CypherParser::RU_CreateNodeTableContext::rU_PropertyDefinitions() { + return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CreateNodeTableContext::AS() { +tree::TerminalNode* CypherParser::RU_CreateNodeTableContext::AS() { return getToken(CypherParser::AS, 0); } -CypherParser::OC_QueryContext* CypherParser::KU_CreateNodeTableContext::oC_Query() { +CypherParser::OC_QueryContext* CypherParser::RU_CreateNodeTableContext::oC_Query() { return getRuleContext(0); } -CypherParser::KU_IfNotExistsContext* CypherParser::KU_CreateNodeTableContext::kU_IfNotExists() { - return getRuleContext(0); +CypherParser::RU_IfNotExistsContext* CypherParser::RU_CreateNodeTableContext::rU_IfNotExists() { + return getRuleContext(0); } -CypherParser::KU_CreateNodeConstraintContext* CypherParser::KU_CreateNodeTableContext::kU_CreateNodeConstraint() { - return getRuleContext(0); +CypherParser::RU_CreateNodeConstraintContext* CypherParser::RU_CreateNodeTableContext::rU_CreateNodeConstraint() { + return getRuleContext(0); } -size_t CypherParser::KU_CreateNodeTableContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateNodeTable; +size_t CypherParser::RU_CreateNodeTableContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateNodeTable; } -CypherParser::KU_CreateNodeTableContext* CypherParser::kU_CreateNodeTable() { - KU_CreateNodeTableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 44, CypherParser::RuleKU_CreateNodeTable); +CypherParser::RU_CreateNodeTableContext* CypherParser::rU_CreateNodeTable() { + RU_CreateNodeTableContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 44, CypherParser::RuleRU_CreateNodeTable); size_t _la = 0; #if __cplusplus > 201703L @@ -4034,7 +4034,7 @@ CypherParser::KU_CreateNodeTableContext* CypherParser::kU_CreateNodeTable() { switch (getInterpreter()->adaptivePredict(_input, 78, _ctx)) { case 1: { setState(795); - kU_IfNotExists(); + rU_IfNotExists(); setState(796); match(CypherParser::SP); break; @@ -4068,7 +4068,7 @@ CypherParser::KU_CreateNodeTableContext* CypherParser::kU_CreateNodeTable() { match(CypherParser::SP); } setState(808); - kU_PropertyDefinitions(); + rU_PropertyDefinitions(); setState(810); _errHandler->sync(this); @@ -4098,7 +4098,7 @@ CypherParser::KU_CreateNodeTableContext* CypherParser::kU_CreateNodeTable() { match(CypherParser::SP); } setState(816); - kU_CreateNodeConstraint(); + rU_CreateNodeConstraint(); } setState(820); _errHandler->sync(this); @@ -4139,81 +4139,81 @@ CypherParser::KU_CreateNodeTableContext* CypherParser::kU_CreateNodeTable() { return _localctx; } -//----------------- KU_CreateRelTableContext ------------------------------------------------------------------ +//----------------- RU_CreateRelTableContext ------------------------------------------------------------------ -CypherParser::KU_CreateRelTableContext::KU_CreateRelTableContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateRelTableContext::RU_CreateRelTableContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateRelTableContext::CREATE() { +tree::TerminalNode* CypherParser::RU_CreateRelTableContext::CREATE() { return getToken(CypherParser::CREATE, 0); } -std::vector CypherParser::KU_CreateRelTableContext::SP() { +std::vector CypherParser::RU_CreateRelTableContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateRelTableContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateRelTableContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateRelTableContext::REL() { +tree::TerminalNode* CypherParser::RU_CreateRelTableContext::REL() { return getToken(CypherParser::REL, 0); } -tree::TerminalNode* CypherParser::KU_CreateRelTableContext::TABLE() { +tree::TerminalNode* CypherParser::RU_CreateRelTableContext::TABLE() { return getToken(CypherParser::TABLE, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_CreateRelTableContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_CreateRelTableContext::oC_SchemaName() { return getRuleContext(0); } -CypherParser::KU_FromToConnectionsContext* CypherParser::KU_CreateRelTableContext::kU_FromToConnections() { - return getRuleContext(0); +CypherParser::RU_FromToConnectionsContext* CypherParser::RU_CreateRelTableContext::rU_FromToConnections() { + return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CreateRelTableContext::AS() { +tree::TerminalNode* CypherParser::RU_CreateRelTableContext::AS() { return getToken(CypherParser::AS, 0); } -CypherParser::OC_QueryContext* CypherParser::KU_CreateRelTableContext::oC_Query() { +CypherParser::OC_QueryContext* CypherParser::RU_CreateRelTableContext::oC_Query() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CreateRelTableContext::GROUP() { +tree::TerminalNode* CypherParser::RU_CreateRelTableContext::GROUP() { return getToken(CypherParser::GROUP, 0); } -CypherParser::KU_IfNotExistsContext* CypherParser::KU_CreateRelTableContext::kU_IfNotExists() { - return getRuleContext(0); +CypherParser::RU_IfNotExistsContext* CypherParser::RU_CreateRelTableContext::rU_IfNotExists() { + return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CreateRelTableContext::WITH() { +tree::TerminalNode* CypherParser::RU_CreateRelTableContext::WITH() { return getToken(CypherParser::WITH, 0); } -CypherParser::KU_OptionsContext* CypherParser::KU_CreateRelTableContext::kU_Options() { - return getRuleContext(0); +CypherParser::RU_OptionsContext* CypherParser::RU_CreateRelTableContext::rU_Options() { + return getRuleContext(0); } -CypherParser::KU_PropertyDefinitionsContext* CypherParser::KU_CreateRelTableContext::kU_PropertyDefinitions() { - return getRuleContext(0); +CypherParser::RU_PropertyDefinitionsContext* CypherParser::RU_CreateRelTableContext::rU_PropertyDefinitions() { + return getRuleContext(0); } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_CreateRelTableContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_CreateRelTableContext::oC_SymbolicName() { return getRuleContext(0); } -size_t CypherParser::KU_CreateRelTableContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateRelTable; +size_t CypherParser::RU_CreateRelTableContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateRelTable; } -CypherParser::KU_CreateRelTableContext* CypherParser::kU_CreateRelTable() { - KU_CreateRelTableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 46, CypherParser::RuleKU_CreateRelTable); +CypherParser::RU_CreateRelTableContext* CypherParser::rU_CreateRelTable() { + RU_CreateRelTableContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 46, CypherParser::RuleRU_CreateRelTable); size_t _la = 0; #if __cplusplus > 201703L @@ -4258,7 +4258,7 @@ CypherParser::KU_CreateRelTableContext* CypherParser::kU_CreateRelTable() { setState(839); match(CypherParser::SP); setState(840); - kU_IfNotExists(); + rU_IfNotExists(); break; } @@ -4288,7 +4288,7 @@ CypherParser::KU_CreateRelTableContext* CypherParser::kU_CreateRelTable() { match(CypherParser::SP); } setState(852); - kU_FromToConnections(); + rU_FromToConnections(); setState(854); _errHandler->sync(this); @@ -4317,7 +4317,7 @@ CypherParser::KU_CreateRelTableContext* CypherParser::kU_CreateRelTable() { match(CypherParser::SP); } setState(860); - kU_PropertyDefinitions(); + rU_PropertyDefinitions(); setState(862); _errHandler->sync(this); @@ -4408,7 +4408,7 @@ CypherParser::KU_CreateRelTableContext* CypherParser::kU_CreateRelTable() { match(CypherParser::SP); } setState(893); - kU_Options(); + rU_Options(); setState(895); _errHandler->sync(this); @@ -4436,37 +4436,37 @@ CypherParser::KU_CreateRelTableContext* CypherParser::kU_CreateRelTable() { return _localctx; } -//----------------- KU_FromToConnectionsContext ------------------------------------------------------------------ +//----------------- RU_FromToConnectionsContext ------------------------------------------------------------------ -CypherParser::KU_FromToConnectionsContext::KU_FromToConnectionsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_FromToConnectionsContext::RU_FromToConnectionsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_FromToConnectionsContext::kU_FromToConnection() { - return getRuleContexts(); +std::vector CypherParser::RU_FromToConnectionsContext::rU_FromToConnection() { + return getRuleContexts(); } -CypherParser::KU_FromToConnectionContext* CypherParser::KU_FromToConnectionsContext::kU_FromToConnection(size_t i) { - return getRuleContext(i); +CypherParser::RU_FromToConnectionContext* CypherParser::RU_FromToConnectionsContext::rU_FromToConnection(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_FromToConnectionsContext::SP() { +std::vector CypherParser::RU_FromToConnectionsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_FromToConnectionsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_FromToConnectionsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_FromToConnectionsContext::getRuleIndex() const { - return CypherParser::RuleKU_FromToConnections; +size_t CypherParser::RU_FromToConnectionsContext::getRuleIndex() const { + return CypherParser::RuleRU_FromToConnections; } -CypherParser::KU_FromToConnectionsContext* CypherParser::kU_FromToConnections() { - KU_FromToConnectionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 48, CypherParser::RuleKU_FromToConnections); +CypherParser::RU_FromToConnectionsContext* CypherParser::rU_FromToConnections() { + RU_FromToConnectionsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 48, CypherParser::RuleRU_FromToConnections); size_t _la = 0; #if __cplusplus > 201703L @@ -4480,7 +4480,7 @@ CypherParser::KU_FromToConnectionsContext* CypherParser::kU_FromToConnections() size_t alt; enterOuterAlt(_localctx, 1); setState(901); - kU_FromToConnection(); + rU_FromToConnection(); setState(912); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 104, _ctx); @@ -4505,7 +4505,7 @@ CypherParser::KU_FromToConnectionsContext* CypherParser::kU_FromToConnections() match(CypherParser::SP); } setState(909); - kU_FromToConnection(); + rU_FromToConnection(); } setState(914); _errHandler->sync(this); @@ -4522,45 +4522,45 @@ CypherParser::KU_FromToConnectionsContext* CypherParser::kU_FromToConnections() return _localctx; } -//----------------- KU_FromToConnectionContext ------------------------------------------------------------------ +//----------------- RU_FromToConnectionContext ------------------------------------------------------------------ -CypherParser::KU_FromToConnectionContext::KU_FromToConnectionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_FromToConnectionContext::RU_FromToConnectionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_FromToConnectionContext::FROM() { +tree::TerminalNode* CypherParser::RU_FromToConnectionContext::FROM() { return getToken(CypherParser::FROM, 0); } -std::vector CypherParser::KU_FromToConnectionContext::SP() { +std::vector CypherParser::RU_FromToConnectionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_FromToConnectionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_FromToConnectionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -std::vector CypherParser::KU_FromToConnectionContext::oC_SchemaName() { +std::vector CypherParser::RU_FromToConnectionContext::oC_SchemaName() { return getRuleContexts(); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_FromToConnectionContext::oC_SchemaName(size_t i) { +CypherParser::OC_SchemaNameContext* CypherParser::RU_FromToConnectionContext::oC_SchemaName(size_t i) { return getRuleContext(i); } -tree::TerminalNode* CypherParser::KU_FromToConnectionContext::TO() { +tree::TerminalNode* CypherParser::RU_FromToConnectionContext::TO() { return getToken(CypherParser::TO, 0); } -size_t CypherParser::KU_FromToConnectionContext::getRuleIndex() const { - return CypherParser::RuleKU_FromToConnection; +size_t CypherParser::RU_FromToConnectionContext::getRuleIndex() const { + return CypherParser::RuleRU_FromToConnection; } -CypherParser::KU_FromToConnectionContext* CypherParser::kU_FromToConnection() { - KU_FromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 50, CypherParser::RuleKU_FromToConnection); +CypherParser::RU_FromToConnectionContext* CypherParser::rU_FromToConnection() { + RU_FromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 50, CypherParser::RuleRU_FromToConnection); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4596,53 +4596,53 @@ CypherParser::KU_FromToConnectionContext* CypherParser::kU_FromToConnection() { return _localctx; } -//----------------- KU_CreateSequenceContext ------------------------------------------------------------------ +//----------------- RU_CreateSequenceContext ------------------------------------------------------------------ -CypherParser::KU_CreateSequenceContext::KU_CreateSequenceContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateSequenceContext::RU_CreateSequenceContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateSequenceContext::CREATE() { +tree::TerminalNode* CypherParser::RU_CreateSequenceContext::CREATE() { return getToken(CypherParser::CREATE, 0); } -std::vector CypherParser::KU_CreateSequenceContext::SP() { +std::vector CypherParser::RU_CreateSequenceContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateSequenceContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateSequenceContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateSequenceContext::SEQUENCE() { +tree::TerminalNode* CypherParser::RU_CreateSequenceContext::SEQUENCE() { return getToken(CypherParser::SEQUENCE, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_CreateSequenceContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_CreateSequenceContext::oC_SchemaName() { return getRuleContext(0); } -CypherParser::KU_IfNotExistsContext* CypherParser::KU_CreateSequenceContext::kU_IfNotExists() { - return getRuleContext(0); +CypherParser::RU_IfNotExistsContext* CypherParser::RU_CreateSequenceContext::rU_IfNotExists() { + return getRuleContext(0); } -std::vector CypherParser::KU_CreateSequenceContext::kU_SequenceOptions() { - return getRuleContexts(); +std::vector CypherParser::RU_CreateSequenceContext::rU_SequenceOptions() { + return getRuleContexts(); } -CypherParser::KU_SequenceOptionsContext* CypherParser::KU_CreateSequenceContext::kU_SequenceOptions(size_t i) { - return getRuleContext(i); +CypherParser::RU_SequenceOptionsContext* CypherParser::RU_CreateSequenceContext::rU_SequenceOptions(size_t i) { + return getRuleContext(i); } -size_t CypherParser::KU_CreateSequenceContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateSequence; +size_t CypherParser::RU_CreateSequenceContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateSequence; } -CypherParser::KU_CreateSequenceContext* CypherParser::kU_CreateSequence() { - KU_CreateSequenceContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 52, CypherParser::RuleKU_CreateSequence); +CypherParser::RU_CreateSequenceContext* CypherParser::rU_CreateSequence() { + RU_CreateSequenceContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 52, CypherParser::RuleRU_CreateSequence); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4668,7 +4668,7 @@ CypherParser::KU_CreateSequenceContext* CypherParser::kU_CreateSequence() { switch (getInterpreter()->adaptivePredict(_input, 105, _ctx)) { case 1: { setState(927); - kU_IfNotExists(); + rU_IfNotExists(); setState(928); match(CypherParser::SP); break; @@ -4687,7 +4687,7 @@ CypherParser::KU_CreateSequenceContext* CypherParser::kU_CreateSequence() { setState(933); match(CypherParser::SP); setState(934); - kU_SequenceOptions(); + rU_SequenceOptions(); } setState(939); _errHandler->sync(this); @@ -4704,49 +4704,49 @@ CypherParser::KU_CreateSequenceContext* CypherParser::kU_CreateSequence() { return _localctx; } -//----------------- KU_CreateTypeContext ------------------------------------------------------------------ +//----------------- RU_CreateTypeContext ------------------------------------------------------------------ -CypherParser::KU_CreateTypeContext::KU_CreateTypeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateTypeContext::RU_CreateTypeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateTypeContext::CREATE() { +tree::TerminalNode* CypherParser::RU_CreateTypeContext::CREATE() { return getToken(CypherParser::CREATE, 0); } -std::vector CypherParser::KU_CreateTypeContext::SP() { +std::vector CypherParser::RU_CreateTypeContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateTypeContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateTypeContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateTypeContext::TYPE() { +tree::TerminalNode* CypherParser::RU_CreateTypeContext::TYPE() { return getToken(CypherParser::TYPE, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_CreateTypeContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_CreateTypeContext::oC_SchemaName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_CreateTypeContext::AS() { +tree::TerminalNode* CypherParser::RU_CreateTypeContext::AS() { return getToken(CypherParser::AS, 0); } -CypherParser::KU_DataTypeContext* CypherParser::KU_CreateTypeContext::kU_DataType() { - return getRuleContext(0); +CypherParser::RU_DataTypeContext* CypherParser::RU_CreateTypeContext::rU_DataType() { + return getRuleContext(0); } -size_t CypherParser::KU_CreateTypeContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateType; +size_t CypherParser::RU_CreateTypeContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateType; } -CypherParser::KU_CreateTypeContext* CypherParser::kU_CreateType() { - KU_CreateTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 54, CypherParser::RuleKU_CreateType); +CypherParser::RU_CreateTypeContext* CypherParser::rU_CreateType() { + RU_CreateTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 54, CypherParser::RuleRU_CreateType); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4774,7 +4774,7 @@ CypherParser::KU_CreateTypeContext* CypherParser::kU_CreateType() { setState(947); match(CypherParser::SP); setState(948); - kU_DataType(0); + rU_DataType(0); setState(950); _errHandler->sync(this); @@ -4799,41 +4799,41 @@ CypherParser::KU_CreateTypeContext* CypherParser::kU_CreateType() { return _localctx; } -//----------------- KU_SequenceOptionsContext ------------------------------------------------------------------ +//----------------- RU_SequenceOptionsContext ------------------------------------------------------------------ -CypherParser::KU_SequenceOptionsContext::KU_SequenceOptionsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_SequenceOptionsContext::RU_SequenceOptionsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::KU_IncrementByContext* CypherParser::KU_SequenceOptionsContext::kU_IncrementBy() { - return getRuleContext(0); +CypherParser::RU_IncrementByContext* CypherParser::RU_SequenceOptionsContext::rU_IncrementBy() { + return getRuleContext(0); } -CypherParser::KU_MinValueContext* CypherParser::KU_SequenceOptionsContext::kU_MinValue() { - return getRuleContext(0); +CypherParser::RU_MinValueContext* CypherParser::RU_SequenceOptionsContext::rU_MinValue() { + return getRuleContext(0); } -CypherParser::KU_MaxValueContext* CypherParser::KU_SequenceOptionsContext::kU_MaxValue() { - return getRuleContext(0); +CypherParser::RU_MaxValueContext* CypherParser::RU_SequenceOptionsContext::rU_MaxValue() { + return getRuleContext(0); } -CypherParser::KU_StartWithContext* CypherParser::KU_SequenceOptionsContext::kU_StartWith() { - return getRuleContext(0); +CypherParser::RU_StartWithContext* CypherParser::RU_SequenceOptionsContext::rU_StartWith() { + return getRuleContext(0); } -CypherParser::KU_CycleContext* CypherParser::KU_SequenceOptionsContext::kU_Cycle() { - return getRuleContext(0); +CypherParser::RU_CycleContext* CypherParser::RU_SequenceOptionsContext::rU_Cycle() { + return getRuleContext(0); } -size_t CypherParser::KU_SequenceOptionsContext::getRuleIndex() const { - return CypherParser::RuleKU_SequenceOptions; +size_t CypherParser::RU_SequenceOptionsContext::getRuleIndex() const { + return CypherParser::RuleRU_SequenceOptions; } -CypherParser::KU_SequenceOptionsContext* CypherParser::kU_SequenceOptions() { - KU_SequenceOptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 56, CypherParser::RuleKU_SequenceOptions); +CypherParser::RU_SequenceOptionsContext* CypherParser::rU_SequenceOptions() { + RU_SequenceOptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 56, CypherParser::RuleRU_SequenceOptions); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4849,35 +4849,35 @@ CypherParser::KU_SequenceOptionsContext* CypherParser::kU_SequenceOptions() { case 1: { enterOuterAlt(_localctx, 1); setState(952); - kU_IncrementBy(); + rU_IncrementBy(); break; } case 2: { enterOuterAlt(_localctx, 2); setState(953); - kU_MinValue(); + rU_MinValue(); break; } case 3: { enterOuterAlt(_localctx, 3); setState(954); - kU_MaxValue(); + rU_MaxValue(); break; } case 4: { enterOuterAlt(_localctx, 4); setState(955); - kU_StartWith(); + rU_StartWith(); break; } case 5: { enterOuterAlt(_localctx, 5); setState(956); - kU_Cycle(); + rU_Cycle(); break; } @@ -4895,41 +4895,41 @@ CypherParser::KU_SequenceOptionsContext* CypherParser::kU_SequenceOptions() { return _localctx; } -//----------------- KU_WithPasswdContext ------------------------------------------------------------------ +//----------------- RU_WithPasswdContext ------------------------------------------------------------------ -CypherParser::KU_WithPasswdContext::KU_WithPasswdContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_WithPasswdContext::RU_WithPasswdContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_WithPasswdContext::SP() { +std::vector CypherParser::RU_WithPasswdContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_WithPasswdContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_WithPasswdContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_WithPasswdContext::WITH() { +tree::TerminalNode* CypherParser::RU_WithPasswdContext::WITH() { return getToken(CypherParser::WITH, 0); } -tree::TerminalNode* CypherParser::KU_WithPasswdContext::PASSWORD() { +tree::TerminalNode* CypherParser::RU_WithPasswdContext::PASSWORD() { return getToken(CypherParser::PASSWORD, 0); } -tree::TerminalNode* CypherParser::KU_WithPasswdContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_WithPasswdContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -size_t CypherParser::KU_WithPasswdContext::getRuleIndex() const { - return CypherParser::RuleKU_WithPasswd; +size_t CypherParser::RU_WithPasswdContext::getRuleIndex() const { + return CypherParser::RuleRU_WithPasswd; } -CypherParser::KU_WithPasswdContext* CypherParser::kU_WithPasswd() { - KU_WithPasswdContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 58, CypherParser::RuleKU_WithPasswd); +CypherParser::RU_WithPasswdContext* CypherParser::rU_WithPasswd() { + RU_WithPasswdContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 58, CypherParser::RuleRU_WithPasswd); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4963,49 +4963,49 @@ CypherParser::KU_WithPasswdContext* CypherParser::kU_WithPasswd() { return _localctx; } -//----------------- KU_CreateUserContext ------------------------------------------------------------------ +//----------------- RU_CreateUserContext ------------------------------------------------------------------ -CypherParser::KU_CreateUserContext::KU_CreateUserContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateUserContext::RU_CreateUserContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateUserContext::CREATE() { +tree::TerminalNode* CypherParser::RU_CreateUserContext::CREATE() { return getToken(CypherParser::CREATE, 0); } -std::vector CypherParser::KU_CreateUserContext::SP() { +std::vector CypherParser::RU_CreateUserContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateUserContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateUserContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateUserContext::USER() { +tree::TerminalNode* CypherParser::RU_CreateUserContext::USER() { return getToken(CypherParser::USER, 0); } -CypherParser::OC_VariableContext* CypherParser::KU_CreateUserContext::oC_Variable() { +CypherParser::OC_VariableContext* CypherParser::RU_CreateUserContext::oC_Variable() { return getRuleContext(0); } -CypherParser::KU_IfNotExistsContext* CypherParser::KU_CreateUserContext::kU_IfNotExists() { - return getRuleContext(0); +CypherParser::RU_IfNotExistsContext* CypherParser::RU_CreateUserContext::rU_IfNotExists() { + return getRuleContext(0); } -CypherParser::KU_WithPasswdContext* CypherParser::KU_CreateUserContext::kU_WithPasswd() { - return getRuleContext(0); +CypherParser::RU_WithPasswdContext* CypherParser::RU_CreateUserContext::rU_WithPasswd() { + return getRuleContext(0); } -size_t CypherParser::KU_CreateUserContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateUser; +size_t CypherParser::RU_CreateUserContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateUser; } -CypherParser::KU_CreateUserContext* CypherParser::kU_CreateUser() { - KU_CreateUserContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 60, CypherParser::RuleKU_CreateUser); +CypherParser::RU_CreateUserContext* CypherParser::rU_CreateUser() { + RU_CreateUserContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 60, CypherParser::RuleRU_CreateUser); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5030,7 +5030,7 @@ CypherParser::KU_CreateUserContext* CypherParser::kU_CreateUser() { switch (getInterpreter()->adaptivePredict(_input, 109, _ctx)) { case 1: { setState(970); - kU_IfNotExists(); + rU_IfNotExists(); setState(971); match(CypherParser::SP); break; @@ -5047,7 +5047,7 @@ CypherParser::KU_CreateUserContext* CypherParser::kU_CreateUser() { switch (getInterpreter()->adaptivePredict(_input, 110, _ctx)) { case 1: { setState(976); - kU_WithPasswd(); + rU_WithPasswd(); break; } @@ -5065,45 +5065,45 @@ CypherParser::KU_CreateUserContext* CypherParser::kU_CreateUser() { return _localctx; } -//----------------- KU_CreateRoleContext ------------------------------------------------------------------ +//----------------- RU_CreateRoleContext ------------------------------------------------------------------ -CypherParser::KU_CreateRoleContext::KU_CreateRoleContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateRoleContext::RU_CreateRoleContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateRoleContext::CREATE() { +tree::TerminalNode* CypherParser::RU_CreateRoleContext::CREATE() { return getToken(CypherParser::CREATE, 0); } -std::vector CypherParser::KU_CreateRoleContext::SP() { +std::vector CypherParser::RU_CreateRoleContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateRoleContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateRoleContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateRoleContext::ROLE() { +tree::TerminalNode* CypherParser::RU_CreateRoleContext::ROLE() { return getToken(CypherParser::ROLE, 0); } -CypherParser::OC_VariableContext* CypherParser::KU_CreateRoleContext::oC_Variable() { +CypherParser::OC_VariableContext* CypherParser::RU_CreateRoleContext::oC_Variable() { return getRuleContext(0); } -CypherParser::KU_IfNotExistsContext* CypherParser::KU_CreateRoleContext::kU_IfNotExists() { - return getRuleContext(0); +CypherParser::RU_IfNotExistsContext* CypherParser::RU_CreateRoleContext::rU_IfNotExists() { + return getRuleContext(0); } -size_t CypherParser::KU_CreateRoleContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateRole; +size_t CypherParser::RU_CreateRoleContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateRole; } -CypherParser::KU_CreateRoleContext* CypherParser::kU_CreateRole() { - KU_CreateRoleContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 62, CypherParser::RuleKU_CreateRole); +CypherParser::RU_CreateRoleContext* CypherParser::rU_CreateRole() { + RU_CreateRoleContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 62, CypherParser::RuleRU_CreateRole); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5128,7 +5128,7 @@ CypherParser::KU_CreateRoleContext* CypherParser::kU_CreateRole() { switch (getInterpreter()->adaptivePredict(_input, 111, _ctx)) { case 1: { setState(983); - kU_IfNotExists(); + rU_IfNotExists(); setState(984); match(CypherParser::SP); break; @@ -5150,45 +5150,45 @@ CypherParser::KU_CreateRoleContext* CypherParser::kU_CreateRole() { return _localctx; } -//----------------- KU_IncrementByContext ------------------------------------------------------------------ +//----------------- RU_IncrementByContext ------------------------------------------------------------------ -CypherParser::KU_IncrementByContext::KU_IncrementByContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_IncrementByContext::RU_IncrementByContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_IncrementByContext::INCREMENT() { +tree::TerminalNode* CypherParser::RU_IncrementByContext::INCREMENT() { return getToken(CypherParser::INCREMENT, 0); } -std::vector CypherParser::KU_IncrementByContext::SP() { +std::vector CypherParser::RU_IncrementByContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_IncrementByContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_IncrementByContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_IntegerLiteralContext* CypherParser::KU_IncrementByContext::oC_IntegerLiteral() { +CypherParser::OC_IntegerLiteralContext* CypherParser::RU_IncrementByContext::oC_IntegerLiteral() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_IncrementByContext::BY() { +tree::TerminalNode* CypherParser::RU_IncrementByContext::BY() { return getToken(CypherParser::BY, 0); } -tree::TerminalNode* CypherParser::KU_IncrementByContext::MINUS() { +tree::TerminalNode* CypherParser::RU_IncrementByContext::MINUS() { return getToken(CypherParser::MINUS, 0); } -size_t CypherParser::KU_IncrementByContext::getRuleIndex() const { - return CypherParser::RuleKU_IncrementBy; +size_t CypherParser::RU_IncrementByContext::getRuleIndex() const { + return CypherParser::RuleRU_IncrementBy; } -CypherParser::KU_IncrementByContext* CypherParser::kU_IncrementBy() { - KU_IncrementByContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 64, CypherParser::RuleKU_IncrementBy); +CypherParser::RU_IncrementByContext* CypherParser::rU_IncrementBy() { + RU_IncrementByContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 64, CypherParser::RuleRU_IncrementBy); size_t _la = 0; #if __cplusplus > 201703L @@ -5235,41 +5235,41 @@ CypherParser::KU_IncrementByContext* CypherParser::kU_IncrementBy() { return _localctx; } -//----------------- KU_MinValueContext ------------------------------------------------------------------ +//----------------- RU_MinValueContext ------------------------------------------------------------------ -CypherParser::KU_MinValueContext::KU_MinValueContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_MinValueContext::RU_MinValueContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_MinValueContext::NO() { +tree::TerminalNode* CypherParser::RU_MinValueContext::NO() { return getToken(CypherParser::NO, 0); } -tree::TerminalNode* CypherParser::KU_MinValueContext::SP() { +tree::TerminalNode* CypherParser::RU_MinValueContext::SP() { return getToken(CypherParser::SP, 0); } -tree::TerminalNode* CypherParser::KU_MinValueContext::MINVALUE() { +tree::TerminalNode* CypherParser::RU_MinValueContext::MINVALUE() { return getToken(CypherParser::MINVALUE, 0); } -CypherParser::OC_IntegerLiteralContext* CypherParser::KU_MinValueContext::oC_IntegerLiteral() { +CypherParser::OC_IntegerLiteralContext* CypherParser::RU_MinValueContext::oC_IntegerLiteral() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_MinValueContext::MINUS() { +tree::TerminalNode* CypherParser::RU_MinValueContext::MINUS() { return getToken(CypherParser::MINUS, 0); } -size_t CypherParser::KU_MinValueContext::getRuleIndex() const { - return CypherParser::RuleKU_MinValue; +size_t CypherParser::RU_MinValueContext::getRuleIndex() const { + return CypherParser::RuleRU_MinValue; } -CypherParser::KU_MinValueContext* CypherParser::kU_MinValue() { - KU_MinValueContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 66, CypherParser::RuleKU_MinValue); +CypherParser::RU_MinValueContext* CypherParser::rU_MinValue() { + RU_MinValueContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 66, CypherParser::RuleRU_MinValue); size_t _la = 0; #if __cplusplus > 201703L @@ -5327,41 +5327,41 @@ CypherParser::KU_MinValueContext* CypherParser::kU_MinValue() { return _localctx; } -//----------------- KU_MaxValueContext ------------------------------------------------------------------ +//----------------- RU_MaxValueContext ------------------------------------------------------------------ -CypherParser::KU_MaxValueContext::KU_MaxValueContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_MaxValueContext::RU_MaxValueContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_MaxValueContext::NO() { +tree::TerminalNode* CypherParser::RU_MaxValueContext::NO() { return getToken(CypherParser::NO, 0); } -tree::TerminalNode* CypherParser::KU_MaxValueContext::SP() { +tree::TerminalNode* CypherParser::RU_MaxValueContext::SP() { return getToken(CypherParser::SP, 0); } -tree::TerminalNode* CypherParser::KU_MaxValueContext::MAXVALUE() { +tree::TerminalNode* CypherParser::RU_MaxValueContext::MAXVALUE() { return getToken(CypherParser::MAXVALUE, 0); } -CypherParser::OC_IntegerLiteralContext* CypherParser::KU_MaxValueContext::oC_IntegerLiteral() { +CypherParser::OC_IntegerLiteralContext* CypherParser::RU_MaxValueContext::oC_IntegerLiteral() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_MaxValueContext::MINUS() { +tree::TerminalNode* CypherParser::RU_MaxValueContext::MINUS() { return getToken(CypherParser::MINUS, 0); } -size_t CypherParser::KU_MaxValueContext::getRuleIndex() const { - return CypherParser::RuleKU_MaxValue; +size_t CypherParser::RU_MaxValueContext::getRuleIndex() const { + return CypherParser::RuleRU_MaxValue; } -CypherParser::KU_MaxValueContext* CypherParser::kU_MaxValue() { - KU_MaxValueContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 68, CypherParser::RuleKU_MaxValue); +CypherParser::RU_MaxValueContext* CypherParser::rU_MaxValue() { + RU_MaxValueContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 68, CypherParser::RuleRU_MaxValue); size_t _la = 0; #if __cplusplus > 201703L @@ -5419,45 +5419,45 @@ CypherParser::KU_MaxValueContext* CypherParser::kU_MaxValue() { return _localctx; } -//----------------- KU_StartWithContext ------------------------------------------------------------------ +//----------------- RU_StartWithContext ------------------------------------------------------------------ -CypherParser::KU_StartWithContext::KU_StartWithContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_StartWithContext::RU_StartWithContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_StartWithContext::START() { +tree::TerminalNode* CypherParser::RU_StartWithContext::START() { return getToken(CypherParser::START, 0); } -std::vector CypherParser::KU_StartWithContext::SP() { +std::vector CypherParser::RU_StartWithContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_StartWithContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_StartWithContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_IntegerLiteralContext* CypherParser::KU_StartWithContext::oC_IntegerLiteral() { +CypherParser::OC_IntegerLiteralContext* CypherParser::RU_StartWithContext::oC_IntegerLiteral() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_StartWithContext::WITH() { +tree::TerminalNode* CypherParser::RU_StartWithContext::WITH() { return getToken(CypherParser::WITH, 0); } -tree::TerminalNode* CypherParser::KU_StartWithContext::MINUS() { +tree::TerminalNode* CypherParser::RU_StartWithContext::MINUS() { return getToken(CypherParser::MINUS, 0); } -size_t CypherParser::KU_StartWithContext::getRuleIndex() const { - return CypherParser::RuleKU_StartWith; +size_t CypherParser::RU_StartWithContext::getRuleIndex() const { + return CypherParser::RuleRU_StartWith; } -CypherParser::KU_StartWithContext* CypherParser::kU_StartWith() { - KU_StartWithContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 70, CypherParser::RuleKU_StartWith); +CypherParser::RU_StartWithContext* CypherParser::rU_StartWith() { + RU_StartWithContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 70, CypherParser::RuleRU_StartWith); size_t _la = 0; #if __cplusplus > 201703L @@ -5504,33 +5504,33 @@ CypherParser::KU_StartWithContext* CypherParser::kU_StartWith() { return _localctx; } -//----------------- KU_CycleContext ------------------------------------------------------------------ +//----------------- RU_CycleContext ------------------------------------------------------------------ -CypherParser::KU_CycleContext::KU_CycleContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CycleContext::RU_CycleContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CycleContext::CYCLE() { +tree::TerminalNode* CypherParser::RU_CycleContext::CYCLE() { return getToken(CypherParser::CYCLE, 0); } -tree::TerminalNode* CypherParser::KU_CycleContext::NO() { +tree::TerminalNode* CypherParser::RU_CycleContext::NO() { return getToken(CypherParser::NO, 0); } -tree::TerminalNode* CypherParser::KU_CycleContext::SP() { +tree::TerminalNode* CypherParser::RU_CycleContext::SP() { return getToken(CypherParser::SP, 0); } -size_t CypherParser::KU_CycleContext::getRuleIndex() const { - return CypherParser::RuleKU_Cycle; +size_t CypherParser::RU_CycleContext::getRuleIndex() const { + return CypherParser::RuleRU_Cycle; } -CypherParser::KU_CycleContext* CypherParser::kU_Cycle() { - KU_CycleContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 72, CypherParser::RuleKU_Cycle); +CypherParser::RU_CycleContext* CypherParser::rU_Cycle() { + RU_CycleContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 72, CypherParser::RuleRU_Cycle); size_t _la = 0; #if __cplusplus > 201703L @@ -5565,33 +5565,33 @@ CypherParser::KU_CycleContext* CypherParser::kU_Cycle() { return _localctx; } -//----------------- KU_IfExistsContext ------------------------------------------------------------------ +//----------------- RU_IfExistsContext ------------------------------------------------------------------ -CypherParser::KU_IfExistsContext::KU_IfExistsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_IfExistsContext::RU_IfExistsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_IfExistsContext::IF() { +tree::TerminalNode* CypherParser::RU_IfExistsContext::IF() { return getToken(CypherParser::IF, 0); } -tree::TerminalNode* CypherParser::KU_IfExistsContext::SP() { +tree::TerminalNode* CypherParser::RU_IfExistsContext::SP() { return getToken(CypherParser::SP, 0); } -tree::TerminalNode* CypherParser::KU_IfExistsContext::EXISTS() { +tree::TerminalNode* CypherParser::RU_IfExistsContext::EXISTS() { return getToken(CypherParser::EXISTS, 0); } -size_t CypherParser::KU_IfExistsContext::getRuleIndex() const { - return CypherParser::RuleKU_IfExists; +size_t CypherParser::RU_IfExistsContext::getRuleIndex() const { + return CypherParser::RuleRU_IfExists; } -CypherParser::KU_IfExistsContext* CypherParser::kU_IfExists() { - KU_IfExistsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 74, CypherParser::RuleKU_IfExists); +CypherParser::RU_IfExistsContext* CypherParser::rU_IfExists() { + RU_IfExistsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 74, CypherParser::RuleRU_IfExists); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5619,53 +5619,53 @@ CypherParser::KU_IfExistsContext* CypherParser::kU_IfExists() { return _localctx; } -//----------------- KU_DropContext ------------------------------------------------------------------ +//----------------- RU_DropContext ------------------------------------------------------------------ -CypherParser::KU_DropContext::KU_DropContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DropContext::RU_DropContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_DropContext::DROP() { +tree::TerminalNode* CypherParser::RU_DropContext::DROP() { return getToken(CypherParser::DROP, 0); } -std::vector CypherParser::KU_DropContext::SP() { +std::vector CypherParser::RU_DropContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_DropContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_DropContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_DropContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_DropContext::oC_SchemaName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_DropContext::TABLE() { +tree::TerminalNode* CypherParser::RU_DropContext::TABLE() { return getToken(CypherParser::TABLE, 0); } -tree::TerminalNode* CypherParser::KU_DropContext::SEQUENCE() { +tree::TerminalNode* CypherParser::RU_DropContext::SEQUENCE() { return getToken(CypherParser::SEQUENCE, 0); } -tree::TerminalNode* CypherParser::KU_DropContext::MACRO() { +tree::TerminalNode* CypherParser::RU_DropContext::MACRO() { return getToken(CypherParser::MACRO, 0); } -CypherParser::KU_IfExistsContext* CypherParser::KU_DropContext::kU_IfExists() { - return getRuleContext(0); +CypherParser::RU_IfExistsContext* CypherParser::RU_DropContext::rU_IfExists() { + return getRuleContext(0); } -size_t CypherParser::KU_DropContext::getRuleIndex() const { - return CypherParser::RuleKU_Drop; +size_t CypherParser::RU_DropContext::getRuleIndex() const { + return CypherParser::RuleRU_Drop; } -CypherParser::KU_DropContext* CypherParser::kU_Drop() { - KU_DropContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 76, CypherParser::RuleKU_Drop); +CypherParser::RU_DropContext* CypherParser::rU_Drop() { + RU_DropContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 76, CypherParser::RuleRU_Drop); size_t _la = 0; #if __cplusplus > 201703L @@ -5699,7 +5699,7 @@ CypherParser::KU_DropContext* CypherParser::kU_Drop() { switch (getInterpreter()->adaptivePredict(_input, 121, _ctx)) { case 1: { setState(1048); - kU_IfExists(); + rU_IfExists(); setState(1049); match(CypherParser::SP); break; @@ -5721,45 +5721,45 @@ CypherParser::KU_DropContext* CypherParser::kU_Drop() { return _localctx; } -//----------------- KU_AlterTableContext ------------------------------------------------------------------ +//----------------- RU_AlterTableContext ------------------------------------------------------------------ -CypherParser::KU_AlterTableContext::KU_AlterTableContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_AlterTableContext::RU_AlterTableContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_AlterTableContext::ALTER() { +tree::TerminalNode* CypherParser::RU_AlterTableContext::ALTER() { return getToken(CypherParser::ALTER, 0); } -std::vector CypherParser::KU_AlterTableContext::SP() { +std::vector CypherParser::RU_AlterTableContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_AlterTableContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_AlterTableContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_AlterTableContext::TABLE() { +tree::TerminalNode* CypherParser::RU_AlterTableContext::TABLE() { return getToken(CypherParser::TABLE, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_AlterTableContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_AlterTableContext::oC_SchemaName() { return getRuleContext(0); } -CypherParser::KU_AlterOptionsContext* CypherParser::KU_AlterTableContext::kU_AlterOptions() { - return getRuleContext(0); +CypherParser::RU_AlterOptionsContext* CypherParser::RU_AlterTableContext::rU_AlterOptions() { + return getRuleContext(0); } -size_t CypherParser::KU_AlterTableContext::getRuleIndex() const { - return CypherParser::RuleKU_AlterTable; +size_t CypherParser::RU_AlterTableContext::getRuleIndex() const { + return CypherParser::RuleRU_AlterTable; } -CypherParser::KU_AlterTableContext* CypherParser::kU_AlterTable() { - KU_AlterTableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 78, CypherParser::RuleKU_AlterTable); +CypherParser::RU_AlterTableContext* CypherParser::rU_AlterTable() { + RU_AlterTableContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 78, CypherParser::RuleRU_AlterTable); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5783,7 +5783,7 @@ CypherParser::KU_AlterTableContext* CypherParser::kU_AlterTable() { setState(1060); match(CypherParser::SP); setState(1061); - kU_AlterOptions(); + rU_AlterOptions(); } catch (RecognitionException &e) { @@ -5795,45 +5795,45 @@ CypherParser::KU_AlterTableContext* CypherParser::kU_AlterTable() { return _localctx; } -//----------------- KU_AlterOptionsContext ------------------------------------------------------------------ +//----------------- RU_AlterOptionsContext ------------------------------------------------------------------ -CypherParser::KU_AlterOptionsContext::KU_AlterOptionsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_AlterOptionsContext::RU_AlterOptionsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::KU_AddPropertyContext* CypherParser::KU_AlterOptionsContext::kU_AddProperty() { - return getRuleContext(0); +CypherParser::RU_AddPropertyContext* CypherParser::RU_AlterOptionsContext::rU_AddProperty() { + return getRuleContext(0); } -CypherParser::KU_DropPropertyContext* CypherParser::KU_AlterOptionsContext::kU_DropProperty() { - return getRuleContext(0); +CypherParser::RU_DropPropertyContext* CypherParser::RU_AlterOptionsContext::rU_DropProperty() { + return getRuleContext(0); } -CypherParser::KU_RenameTableContext* CypherParser::KU_AlterOptionsContext::kU_RenameTable() { - return getRuleContext(0); +CypherParser::RU_RenameTableContext* CypherParser::RU_AlterOptionsContext::rU_RenameTable() { + return getRuleContext(0); } -CypherParser::KU_RenamePropertyContext* CypherParser::KU_AlterOptionsContext::kU_RenameProperty() { - return getRuleContext(0); +CypherParser::RU_RenamePropertyContext* CypherParser::RU_AlterOptionsContext::rU_RenameProperty() { + return getRuleContext(0); } -CypherParser::KU_AddFromToConnectionContext* CypherParser::KU_AlterOptionsContext::kU_AddFromToConnection() { - return getRuleContext(0); +CypherParser::RU_AddFromToConnectionContext* CypherParser::RU_AlterOptionsContext::rU_AddFromToConnection() { + return getRuleContext(0); } -CypherParser::KU_DropFromToConnectionContext* CypherParser::KU_AlterOptionsContext::kU_DropFromToConnection() { - return getRuleContext(0); +CypherParser::RU_DropFromToConnectionContext* CypherParser::RU_AlterOptionsContext::rU_DropFromToConnection() { + return getRuleContext(0); } -size_t CypherParser::KU_AlterOptionsContext::getRuleIndex() const { - return CypherParser::RuleKU_AlterOptions; +size_t CypherParser::RU_AlterOptionsContext::getRuleIndex() const { + return CypherParser::RuleRU_AlterOptions; } -CypherParser::KU_AlterOptionsContext* CypherParser::kU_AlterOptions() { - KU_AlterOptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 80, CypherParser::RuleKU_AlterOptions); +CypherParser::RU_AlterOptionsContext* CypherParser::rU_AlterOptions() { + RU_AlterOptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 80, CypherParser::RuleRU_AlterOptions); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5849,42 +5849,42 @@ CypherParser::KU_AlterOptionsContext* CypherParser::kU_AlterOptions() { case 1: { enterOuterAlt(_localctx, 1); setState(1063); - kU_AddProperty(); + rU_AddProperty(); break; } case 2: { enterOuterAlt(_localctx, 2); setState(1064); - kU_DropProperty(); + rU_DropProperty(); break; } case 3: { enterOuterAlt(_localctx, 3); setState(1065); - kU_RenameTable(); + rU_RenameTable(); break; } case 4: { enterOuterAlt(_localctx, 4); setState(1066); - kU_RenameProperty(); + rU_RenameProperty(); break; } case 5: { enterOuterAlt(_localctx, 5); setState(1067); - kU_AddFromToConnection(); + rU_AddFromToConnection(); break; } case 6: { enterOuterAlt(_localctx, 6); setState(1068); - kU_DropFromToConnection(); + rU_DropFromToConnection(); break; } @@ -5902,49 +5902,49 @@ CypherParser::KU_AlterOptionsContext* CypherParser::kU_AlterOptions() { return _localctx; } -//----------------- KU_AddPropertyContext ------------------------------------------------------------------ +//----------------- RU_AddPropertyContext ------------------------------------------------------------------ -CypherParser::KU_AddPropertyContext::KU_AddPropertyContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_AddPropertyContext::RU_AddPropertyContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_AddPropertyContext::ADD() { +tree::TerminalNode* CypherParser::RU_AddPropertyContext::ADD() { return getToken(CypherParser::ADD, 0); } -std::vector CypherParser::KU_AddPropertyContext::SP() { +std::vector CypherParser::RU_AddPropertyContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_AddPropertyContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_AddPropertyContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_PropertyKeyNameContext* CypherParser::KU_AddPropertyContext::oC_PropertyKeyName() { +CypherParser::OC_PropertyKeyNameContext* CypherParser::RU_AddPropertyContext::oC_PropertyKeyName() { return getRuleContext(0); } -CypherParser::KU_DataTypeContext* CypherParser::KU_AddPropertyContext::kU_DataType() { - return getRuleContext(0); +CypherParser::RU_DataTypeContext* CypherParser::RU_AddPropertyContext::rU_DataType() { + return getRuleContext(0); } -CypherParser::KU_IfNotExistsContext* CypherParser::KU_AddPropertyContext::kU_IfNotExists() { - return getRuleContext(0); +CypherParser::RU_IfNotExistsContext* CypherParser::RU_AddPropertyContext::rU_IfNotExists() { + return getRuleContext(0); } -CypherParser::KU_DefaultContext* CypherParser::KU_AddPropertyContext::kU_Default() { - return getRuleContext(0); +CypherParser::RU_DefaultContext* CypherParser::RU_AddPropertyContext::rU_Default() { + return getRuleContext(0); } -size_t CypherParser::KU_AddPropertyContext::getRuleIndex() const { - return CypherParser::RuleKU_AddProperty; +size_t CypherParser::RU_AddPropertyContext::getRuleIndex() const { + return CypherParser::RuleRU_AddProperty; } -CypherParser::KU_AddPropertyContext* CypherParser::kU_AddProperty() { - KU_AddPropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 82, CypherParser::RuleKU_AddProperty); +CypherParser::RU_AddPropertyContext* CypherParser::rU_AddProperty() { + RU_AddPropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 82, CypherParser::RuleRU_AddProperty); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5965,7 +5965,7 @@ CypherParser::KU_AddPropertyContext* CypherParser::kU_AddProperty() { switch (getInterpreter()->adaptivePredict(_input, 123, _ctx)) { case 1: { setState(1073); - kU_IfNotExists(); + rU_IfNotExists(); setState(1074); match(CypherParser::SP); break; @@ -5979,7 +5979,7 @@ CypherParser::KU_AddPropertyContext* CypherParser::kU_AddProperty() { setState(1079); match(CypherParser::SP); setState(1080); - kU_DataType(0); + rU_DataType(0); setState(1083); _errHandler->sync(this); @@ -5988,7 +5988,7 @@ CypherParser::KU_AddPropertyContext* CypherParser::kU_AddProperty() { setState(1081); match(CypherParser::SP); setState(1082); - kU_Default(); + rU_Default(); break; } @@ -6006,33 +6006,33 @@ CypherParser::KU_AddPropertyContext* CypherParser::kU_AddProperty() { return _localctx; } -//----------------- KU_DefaultContext ------------------------------------------------------------------ +//----------------- RU_DefaultContext ------------------------------------------------------------------ -CypherParser::KU_DefaultContext::KU_DefaultContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DefaultContext::RU_DefaultContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_DefaultContext::DEFAULT() { +tree::TerminalNode* CypherParser::RU_DefaultContext::DEFAULT() { return getToken(CypherParser::DEFAULT, 0); } -tree::TerminalNode* CypherParser::KU_DefaultContext::SP() { +tree::TerminalNode* CypherParser::RU_DefaultContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::OC_ExpressionContext* CypherParser::KU_DefaultContext::oC_Expression() { +CypherParser::OC_ExpressionContext* CypherParser::RU_DefaultContext::oC_Expression() { return getRuleContext(0); } -size_t CypherParser::KU_DefaultContext::getRuleIndex() const { - return CypherParser::RuleKU_Default; +size_t CypherParser::RU_DefaultContext::getRuleIndex() const { + return CypherParser::RuleRU_Default; } -CypherParser::KU_DefaultContext* CypherParser::kU_Default() { - KU_DefaultContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 84, CypherParser::RuleKU_Default); +CypherParser::RU_DefaultContext* CypherParser::rU_Default() { + RU_DefaultContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 84, CypherParser::RuleRU_Default); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6060,41 +6060,41 @@ CypherParser::KU_DefaultContext* CypherParser::kU_Default() { return _localctx; } -//----------------- KU_DropPropertyContext ------------------------------------------------------------------ +//----------------- RU_DropPropertyContext ------------------------------------------------------------------ -CypherParser::KU_DropPropertyContext::KU_DropPropertyContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DropPropertyContext::RU_DropPropertyContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_DropPropertyContext::DROP() { +tree::TerminalNode* CypherParser::RU_DropPropertyContext::DROP() { return getToken(CypherParser::DROP, 0); } -std::vector CypherParser::KU_DropPropertyContext::SP() { +std::vector CypherParser::RU_DropPropertyContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_DropPropertyContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_DropPropertyContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_PropertyKeyNameContext* CypherParser::KU_DropPropertyContext::oC_PropertyKeyName() { +CypherParser::OC_PropertyKeyNameContext* CypherParser::RU_DropPropertyContext::oC_PropertyKeyName() { return getRuleContext(0); } -CypherParser::KU_IfExistsContext* CypherParser::KU_DropPropertyContext::kU_IfExists() { - return getRuleContext(0); +CypherParser::RU_IfExistsContext* CypherParser::RU_DropPropertyContext::rU_IfExists() { + return getRuleContext(0); } -size_t CypherParser::KU_DropPropertyContext::getRuleIndex() const { - return CypherParser::RuleKU_DropProperty; +size_t CypherParser::RU_DropPropertyContext::getRuleIndex() const { + return CypherParser::RuleRU_DropProperty; } -CypherParser::KU_DropPropertyContext* CypherParser::kU_DropProperty() { - KU_DropPropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 86, CypherParser::RuleKU_DropProperty); +CypherParser::RU_DropPropertyContext* CypherParser::rU_DropProperty() { + RU_DropPropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 86, CypherParser::RuleRU_DropProperty); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6115,7 +6115,7 @@ CypherParser::KU_DropPropertyContext* CypherParser::kU_DropProperty() { switch (getInterpreter()->adaptivePredict(_input, 125, _ctx)) { case 1: { setState(1091); - kU_IfExists(); + rU_IfExists(); setState(1092); match(CypherParser::SP); break; @@ -6137,41 +6137,41 @@ CypherParser::KU_DropPropertyContext* CypherParser::kU_DropProperty() { return _localctx; } -//----------------- KU_RenameTableContext ------------------------------------------------------------------ +//----------------- RU_RenameTableContext ------------------------------------------------------------------ -CypherParser::KU_RenameTableContext::KU_RenameTableContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_RenameTableContext::RU_RenameTableContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_RenameTableContext::RENAME() { +tree::TerminalNode* CypherParser::RU_RenameTableContext::RENAME() { return getToken(CypherParser::RENAME, 0); } -std::vector CypherParser::KU_RenameTableContext::SP() { +std::vector CypherParser::RU_RenameTableContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_RenameTableContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_RenameTableContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_RenameTableContext::TO() { +tree::TerminalNode* CypherParser::RU_RenameTableContext::TO() { return getToken(CypherParser::TO, 0); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_RenameTableContext::oC_SchemaName() { +CypherParser::OC_SchemaNameContext* CypherParser::RU_RenameTableContext::oC_SchemaName() { return getRuleContext(0); } -size_t CypherParser::KU_RenameTableContext::getRuleIndex() const { - return CypherParser::RuleKU_RenameTable; +size_t CypherParser::RU_RenameTableContext::getRuleIndex() const { + return CypherParser::RuleRU_RenameTable; } -CypherParser::KU_RenameTableContext* CypherParser::kU_RenameTable() { - KU_RenameTableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 88, CypherParser::RuleKU_RenameTable); +CypherParser::RU_RenameTableContext* CypherParser::rU_RenameTable() { + RU_RenameTableContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 88, CypherParser::RuleRU_RenameTable); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6203,45 +6203,45 @@ CypherParser::KU_RenameTableContext* CypherParser::kU_RenameTable() { return _localctx; } -//----------------- KU_RenamePropertyContext ------------------------------------------------------------------ +//----------------- RU_RenamePropertyContext ------------------------------------------------------------------ -CypherParser::KU_RenamePropertyContext::KU_RenamePropertyContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_RenamePropertyContext::RU_RenamePropertyContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_RenamePropertyContext::RENAME() { +tree::TerminalNode* CypherParser::RU_RenamePropertyContext::RENAME() { return getToken(CypherParser::RENAME, 0); } -std::vector CypherParser::KU_RenamePropertyContext::SP() { +std::vector CypherParser::RU_RenamePropertyContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_RenamePropertyContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_RenamePropertyContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -std::vector CypherParser::KU_RenamePropertyContext::oC_PropertyKeyName() { +std::vector CypherParser::RU_RenamePropertyContext::oC_PropertyKeyName() { return getRuleContexts(); } -CypherParser::OC_PropertyKeyNameContext* CypherParser::KU_RenamePropertyContext::oC_PropertyKeyName(size_t i) { +CypherParser::OC_PropertyKeyNameContext* CypherParser::RU_RenamePropertyContext::oC_PropertyKeyName(size_t i) { return getRuleContext(i); } -tree::TerminalNode* CypherParser::KU_RenamePropertyContext::TO() { +tree::TerminalNode* CypherParser::RU_RenamePropertyContext::TO() { return getToken(CypherParser::TO, 0); } -size_t CypherParser::KU_RenamePropertyContext::getRuleIndex() const { - return CypherParser::RuleKU_RenameProperty; +size_t CypherParser::RU_RenamePropertyContext::getRuleIndex() const { + return CypherParser::RuleRU_RenameProperty; } -CypherParser::KU_RenamePropertyContext* CypherParser::kU_RenameProperty() { - KU_RenamePropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 90, CypherParser::RuleKU_RenameProperty); +CypherParser::RU_RenamePropertyContext* CypherParser::rU_RenameProperty() { + RU_RenamePropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 90, CypherParser::RuleRU_RenameProperty); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6277,41 +6277,41 @@ CypherParser::KU_RenamePropertyContext* CypherParser::kU_RenameProperty() { return _localctx; } -//----------------- KU_AddFromToConnectionContext ------------------------------------------------------------------ +//----------------- RU_AddFromToConnectionContext ------------------------------------------------------------------ -CypherParser::KU_AddFromToConnectionContext::KU_AddFromToConnectionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_AddFromToConnectionContext::RU_AddFromToConnectionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_AddFromToConnectionContext::ADD() { +tree::TerminalNode* CypherParser::RU_AddFromToConnectionContext::ADD() { return getToken(CypherParser::ADD, 0); } -std::vector CypherParser::KU_AddFromToConnectionContext::SP() { +std::vector CypherParser::RU_AddFromToConnectionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_AddFromToConnectionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_AddFromToConnectionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::KU_FromToConnectionContext* CypherParser::KU_AddFromToConnectionContext::kU_FromToConnection() { - return getRuleContext(0); +CypherParser::RU_FromToConnectionContext* CypherParser::RU_AddFromToConnectionContext::rU_FromToConnection() { + return getRuleContext(0); } -CypherParser::KU_IfNotExistsContext* CypherParser::KU_AddFromToConnectionContext::kU_IfNotExists() { - return getRuleContext(0); +CypherParser::RU_IfNotExistsContext* CypherParser::RU_AddFromToConnectionContext::rU_IfNotExists() { + return getRuleContext(0); } -size_t CypherParser::KU_AddFromToConnectionContext::getRuleIndex() const { - return CypherParser::RuleKU_AddFromToConnection; +size_t CypherParser::RU_AddFromToConnectionContext::getRuleIndex() const { + return CypherParser::RuleRU_AddFromToConnection; } -CypherParser::KU_AddFromToConnectionContext* CypherParser::kU_AddFromToConnection() { - KU_AddFromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 92, CypherParser::RuleKU_AddFromToConnection); +CypherParser::RU_AddFromToConnectionContext* CypherParser::rU_AddFromToConnection() { + RU_AddFromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 92, CypherParser::RuleRU_AddFromToConnection); size_t _la = 0; #if __cplusplus > 201703L @@ -6333,12 +6333,12 @@ CypherParser::KU_AddFromToConnectionContext* CypherParser::kU_AddFromToConnectio _la = _input->LA(1); if (_la == CypherParser::IF) { setState(1114); - kU_IfNotExists(); + rU_IfNotExists(); setState(1115); match(CypherParser::SP); } setState(1119); - kU_FromToConnection(); + rU_FromToConnection(); } catch (RecognitionException &e) { @@ -6350,41 +6350,41 @@ CypherParser::KU_AddFromToConnectionContext* CypherParser::kU_AddFromToConnectio return _localctx; } -//----------------- KU_DropFromToConnectionContext ------------------------------------------------------------------ +//----------------- RU_DropFromToConnectionContext ------------------------------------------------------------------ -CypherParser::KU_DropFromToConnectionContext::KU_DropFromToConnectionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DropFromToConnectionContext::RU_DropFromToConnectionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_DropFromToConnectionContext::DROP() { +tree::TerminalNode* CypherParser::RU_DropFromToConnectionContext::DROP() { return getToken(CypherParser::DROP, 0); } -std::vector CypherParser::KU_DropFromToConnectionContext::SP() { +std::vector CypherParser::RU_DropFromToConnectionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_DropFromToConnectionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_DropFromToConnectionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::KU_FromToConnectionContext* CypherParser::KU_DropFromToConnectionContext::kU_FromToConnection() { - return getRuleContext(0); +CypherParser::RU_FromToConnectionContext* CypherParser::RU_DropFromToConnectionContext::rU_FromToConnection() { + return getRuleContext(0); } -CypherParser::KU_IfExistsContext* CypherParser::KU_DropFromToConnectionContext::kU_IfExists() { - return getRuleContext(0); +CypherParser::RU_IfExistsContext* CypherParser::RU_DropFromToConnectionContext::rU_IfExists() { + return getRuleContext(0); } -size_t CypherParser::KU_DropFromToConnectionContext::getRuleIndex() const { - return CypherParser::RuleKU_DropFromToConnection; +size_t CypherParser::RU_DropFromToConnectionContext::getRuleIndex() const { + return CypherParser::RuleRU_DropFromToConnection; } -CypherParser::KU_DropFromToConnectionContext* CypherParser::kU_DropFromToConnection() { - KU_DropFromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 94, CypherParser::RuleKU_DropFromToConnection); +CypherParser::RU_DropFromToConnectionContext* CypherParser::rU_DropFromToConnection() { + RU_DropFromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 94, CypherParser::RuleRU_DropFromToConnection); size_t _la = 0; #if __cplusplus > 201703L @@ -6406,12 +6406,12 @@ CypherParser::KU_DropFromToConnectionContext* CypherParser::kU_DropFromToConnect _la = _input->LA(1); if (_la == CypherParser::IF) { setState(1123); - kU_IfExists(); + rU_IfExists(); setState(1124); match(CypherParser::SP); } setState(1128); - kU_FromToConnection(); + rU_FromToConnection(); } catch (RecognitionException &e) { @@ -6423,37 +6423,37 @@ CypherParser::KU_DropFromToConnectionContext* CypherParser::kU_DropFromToConnect return _localctx; } -//----------------- KU_ColumnDefinitionsContext ------------------------------------------------------------------ +//----------------- RU_ColumnDefinitionsContext ------------------------------------------------------------------ -CypherParser::KU_ColumnDefinitionsContext::KU_ColumnDefinitionsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ColumnDefinitionsContext::RU_ColumnDefinitionsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_ColumnDefinitionsContext::kU_ColumnDefinition() { - return getRuleContexts(); +std::vector CypherParser::RU_ColumnDefinitionsContext::rU_ColumnDefinition() { + return getRuleContexts(); } -CypherParser::KU_ColumnDefinitionContext* CypherParser::KU_ColumnDefinitionsContext::kU_ColumnDefinition(size_t i) { - return getRuleContext(i); +CypherParser::RU_ColumnDefinitionContext* CypherParser::RU_ColumnDefinitionsContext::rU_ColumnDefinition(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_ColumnDefinitionsContext::SP() { +std::vector CypherParser::RU_ColumnDefinitionsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_ColumnDefinitionsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_ColumnDefinitionsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_ColumnDefinitionsContext::getRuleIndex() const { - return CypherParser::RuleKU_ColumnDefinitions; +size_t CypherParser::RU_ColumnDefinitionsContext::getRuleIndex() const { + return CypherParser::RuleRU_ColumnDefinitions; } -CypherParser::KU_ColumnDefinitionsContext* CypherParser::kU_ColumnDefinitions() { - KU_ColumnDefinitionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 96, CypherParser::RuleKU_ColumnDefinitions); +CypherParser::RU_ColumnDefinitionsContext* CypherParser::rU_ColumnDefinitions() { + RU_ColumnDefinitionsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 96, CypherParser::RuleRU_ColumnDefinitions); size_t _la = 0; #if __cplusplus > 201703L @@ -6467,7 +6467,7 @@ CypherParser::KU_ColumnDefinitionsContext* CypherParser::kU_ColumnDefinitions() size_t alt; enterOuterAlt(_localctx, 1); setState(1130); - kU_ColumnDefinition(); + rU_ColumnDefinition(); setState(1141); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 130, _ctx); @@ -6492,7 +6492,7 @@ CypherParser::KU_ColumnDefinitionsContext* CypherParser::kU_ColumnDefinitions() match(CypherParser::SP); } setState(1138); - kU_ColumnDefinition(); + rU_ColumnDefinition(); } setState(1143); _errHandler->sync(this); @@ -6509,33 +6509,33 @@ CypherParser::KU_ColumnDefinitionsContext* CypherParser::kU_ColumnDefinitions() return _localctx; } -//----------------- KU_ColumnDefinitionContext ------------------------------------------------------------------ +//----------------- RU_ColumnDefinitionContext ------------------------------------------------------------------ -CypherParser::KU_ColumnDefinitionContext::KU_ColumnDefinitionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ColumnDefinitionContext::RU_ColumnDefinitionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::OC_PropertyKeyNameContext* CypherParser::KU_ColumnDefinitionContext::oC_PropertyKeyName() { +CypherParser::OC_PropertyKeyNameContext* CypherParser::RU_ColumnDefinitionContext::oC_PropertyKeyName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_ColumnDefinitionContext::SP() { +tree::TerminalNode* CypherParser::RU_ColumnDefinitionContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::KU_DataTypeContext* CypherParser::KU_ColumnDefinitionContext::kU_DataType() { - return getRuleContext(0); +CypherParser::RU_DataTypeContext* CypherParser::RU_ColumnDefinitionContext::rU_DataType() { + return getRuleContext(0); } -size_t CypherParser::KU_ColumnDefinitionContext::getRuleIndex() const { - return CypherParser::RuleKU_ColumnDefinition; +size_t CypherParser::RU_ColumnDefinitionContext::getRuleIndex() const { + return CypherParser::RuleRU_ColumnDefinition; } -CypherParser::KU_ColumnDefinitionContext* CypherParser::kU_ColumnDefinition() { - KU_ColumnDefinitionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 98, CypherParser::RuleKU_ColumnDefinition); +CypherParser::RU_ColumnDefinitionContext* CypherParser::rU_ColumnDefinition() { + RU_ColumnDefinitionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 98, CypherParser::RuleRU_ColumnDefinition); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6551,7 +6551,7 @@ CypherParser::KU_ColumnDefinitionContext* CypherParser::kU_ColumnDefinition() { setState(1145); match(CypherParser::SP); setState(1146); - kU_DataType(0); + rU_DataType(0); } catch (RecognitionException &e) { @@ -6563,37 +6563,37 @@ CypherParser::KU_ColumnDefinitionContext* CypherParser::kU_ColumnDefinition() { return _localctx; } -//----------------- KU_PropertyDefinitionsContext ------------------------------------------------------------------ +//----------------- RU_PropertyDefinitionsContext ------------------------------------------------------------------ -CypherParser::KU_PropertyDefinitionsContext::KU_PropertyDefinitionsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_PropertyDefinitionsContext::RU_PropertyDefinitionsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_PropertyDefinitionsContext::kU_PropertyDefinition() { - return getRuleContexts(); +std::vector CypherParser::RU_PropertyDefinitionsContext::rU_PropertyDefinition() { + return getRuleContexts(); } -CypherParser::KU_PropertyDefinitionContext* CypherParser::KU_PropertyDefinitionsContext::kU_PropertyDefinition(size_t i) { - return getRuleContext(i); +CypherParser::RU_PropertyDefinitionContext* CypherParser::RU_PropertyDefinitionsContext::rU_PropertyDefinition(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_PropertyDefinitionsContext::SP() { +std::vector CypherParser::RU_PropertyDefinitionsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_PropertyDefinitionsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_PropertyDefinitionsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_PropertyDefinitionsContext::getRuleIndex() const { - return CypherParser::RuleKU_PropertyDefinitions; +size_t CypherParser::RU_PropertyDefinitionsContext::getRuleIndex() const { + return CypherParser::RuleRU_PropertyDefinitions; } -CypherParser::KU_PropertyDefinitionsContext* CypherParser::kU_PropertyDefinitions() { - KU_PropertyDefinitionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 100, CypherParser::RuleKU_PropertyDefinitions); +CypherParser::RU_PropertyDefinitionsContext* CypherParser::rU_PropertyDefinitions() { + RU_PropertyDefinitionsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 100, CypherParser::RuleRU_PropertyDefinitions); size_t _la = 0; #if __cplusplus > 201703L @@ -6607,7 +6607,7 @@ CypherParser::KU_PropertyDefinitionsContext* CypherParser::kU_PropertyDefinition size_t alt; enterOuterAlt(_localctx, 1); setState(1148); - kU_PropertyDefinition(); + rU_PropertyDefinition(); setState(1159); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 133, _ctx); @@ -6632,7 +6632,7 @@ CypherParser::KU_PropertyDefinitionsContext* CypherParser::kU_PropertyDefinition match(CypherParser::SP); } setState(1156); - kU_PropertyDefinition(); + rU_PropertyDefinition(); } setState(1161); _errHandler->sync(this); @@ -6649,45 +6649,45 @@ CypherParser::KU_PropertyDefinitionsContext* CypherParser::kU_PropertyDefinition return _localctx; } -//----------------- KU_PropertyDefinitionContext ------------------------------------------------------------------ +//----------------- RU_PropertyDefinitionContext ------------------------------------------------------------------ -CypherParser::KU_PropertyDefinitionContext::KU_PropertyDefinitionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_PropertyDefinitionContext::RU_PropertyDefinitionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::KU_ColumnDefinitionContext* CypherParser::KU_PropertyDefinitionContext::kU_ColumnDefinition() { - return getRuleContext(0); +CypherParser::RU_ColumnDefinitionContext* CypherParser::RU_PropertyDefinitionContext::rU_ColumnDefinition() { + return getRuleContext(0); } -std::vector CypherParser::KU_PropertyDefinitionContext::SP() { +std::vector CypherParser::RU_PropertyDefinitionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_PropertyDefinitionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_PropertyDefinitionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::KU_DefaultContext* CypherParser::KU_PropertyDefinitionContext::kU_Default() { - return getRuleContext(0); +CypherParser::RU_DefaultContext* CypherParser::RU_PropertyDefinitionContext::rU_Default() { + return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_PropertyDefinitionContext::PRIMARY() { +tree::TerminalNode* CypherParser::RU_PropertyDefinitionContext::PRIMARY() { return getToken(CypherParser::PRIMARY, 0); } -tree::TerminalNode* CypherParser::KU_PropertyDefinitionContext::KEY() { +tree::TerminalNode* CypherParser::RU_PropertyDefinitionContext::KEY() { return getToken(CypherParser::KEY, 0); } -size_t CypherParser::KU_PropertyDefinitionContext::getRuleIndex() const { - return CypherParser::RuleKU_PropertyDefinition; +size_t CypherParser::RU_PropertyDefinitionContext::getRuleIndex() const { + return CypherParser::RuleRU_PropertyDefinition; } -CypherParser::KU_PropertyDefinitionContext* CypherParser::kU_PropertyDefinition() { - KU_PropertyDefinitionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 102, CypherParser::RuleKU_PropertyDefinition); +CypherParser::RU_PropertyDefinitionContext* CypherParser::rU_PropertyDefinition() { + RU_PropertyDefinitionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 102, CypherParser::RuleRU_PropertyDefinition); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6699,7 +6699,7 @@ CypherParser::KU_PropertyDefinitionContext* CypherParser::kU_PropertyDefinition( try { enterOuterAlt(_localctx, 1); setState(1162); - kU_ColumnDefinition(); + rU_ColumnDefinition(); setState(1165); _errHandler->sync(this); @@ -6708,7 +6708,7 @@ CypherParser::KU_PropertyDefinitionContext* CypherParser::kU_PropertyDefinition( setState(1163); match(CypherParser::SP); setState(1164); - kU_Default(); + rU_Default(); break; } @@ -6745,41 +6745,41 @@ CypherParser::KU_PropertyDefinitionContext* CypherParser::kU_PropertyDefinition( return _localctx; } -//----------------- KU_CreateNodeConstraintContext ------------------------------------------------------------------ +//----------------- RU_CreateNodeConstraintContext ------------------------------------------------------------------ -CypherParser::KU_CreateNodeConstraintContext::KU_CreateNodeConstraintContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_CreateNodeConstraintContext::RU_CreateNodeConstraintContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CreateNodeConstraintContext::PRIMARY() { +tree::TerminalNode* CypherParser::RU_CreateNodeConstraintContext::PRIMARY() { return getToken(CypherParser::PRIMARY, 0); } -std::vector CypherParser::KU_CreateNodeConstraintContext::SP() { +std::vector CypherParser::RU_CreateNodeConstraintContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_CreateNodeConstraintContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_CreateNodeConstraintContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_CreateNodeConstraintContext::KEY() { +tree::TerminalNode* CypherParser::RU_CreateNodeConstraintContext::KEY() { return getToken(CypherParser::KEY, 0); } -CypherParser::OC_PropertyKeyNameContext* CypherParser::KU_CreateNodeConstraintContext::oC_PropertyKeyName() { +CypherParser::OC_PropertyKeyNameContext* CypherParser::RU_CreateNodeConstraintContext::oC_PropertyKeyName() { return getRuleContext(0); } -size_t CypherParser::KU_CreateNodeConstraintContext::getRuleIndex() const { - return CypherParser::RuleKU_CreateNodeConstraint; +size_t CypherParser::RU_CreateNodeConstraintContext::getRuleIndex() const { + return CypherParser::RuleRU_CreateNodeConstraint; } -CypherParser::KU_CreateNodeConstraintContext* CypherParser::kU_CreateNodeConstraint() { - KU_CreateNodeConstraintContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 104, CypherParser::RuleKU_CreateNodeConstraint); +CypherParser::RU_CreateNodeConstraintContext* CypherParser::rU_CreateNodeConstraint() { + RU_CreateNodeConstraintContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 104, CypherParser::RuleRU_CreateNodeConstraint); size_t _la = 0; #if __cplusplus > 201703L @@ -6838,37 +6838,37 @@ CypherParser::KU_CreateNodeConstraintContext* CypherParser::kU_CreateNodeConstra return _localctx; } -//----------------- KU_UnionTypeContext ------------------------------------------------------------------ +//----------------- RU_UnionTypeContext ------------------------------------------------------------------ -CypherParser::KU_UnionTypeContext::KU_UnionTypeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_UnionTypeContext::RU_UnionTypeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_UnionTypeContext::UNION() { +tree::TerminalNode* CypherParser::RU_UnionTypeContext::UNION() { return getToken(CypherParser::UNION, 0); } -CypherParser::KU_ColumnDefinitionsContext* CypherParser::KU_UnionTypeContext::kU_ColumnDefinitions() { - return getRuleContext(0); +CypherParser::RU_ColumnDefinitionsContext* CypherParser::RU_UnionTypeContext::rU_ColumnDefinitions() { + return getRuleContext(0); } -std::vector CypherParser::KU_UnionTypeContext::SP() { +std::vector CypherParser::RU_UnionTypeContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_UnionTypeContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_UnionTypeContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_UnionTypeContext::getRuleIndex() const { - return CypherParser::RuleKU_UnionType; +size_t CypherParser::RU_UnionTypeContext::getRuleIndex() const { + return CypherParser::RuleRU_UnionType; } -CypherParser::KU_UnionTypeContext* CypherParser::kU_UnionType() { - KU_UnionTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 106, CypherParser::RuleKU_UnionType); +CypherParser::RU_UnionTypeContext* CypherParser::rU_UnionType() { + RU_UnionTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 106, CypherParser::RuleRU_UnionType); size_t _la = 0; #if __cplusplus > 201703L @@ -6901,7 +6901,7 @@ CypherParser::KU_UnionTypeContext* CypherParser::kU_UnionType() { match(CypherParser::SP); } setState(1197); - kU_ColumnDefinitions(); + rU_ColumnDefinitions(); setState(1199); _errHandler->sync(this); @@ -6923,37 +6923,37 @@ CypherParser::KU_UnionTypeContext* CypherParser::kU_UnionType() { return _localctx; } -//----------------- KU_StructTypeContext ------------------------------------------------------------------ +//----------------- RU_StructTypeContext ------------------------------------------------------------------ -CypherParser::KU_StructTypeContext::KU_StructTypeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_StructTypeContext::RU_StructTypeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_StructTypeContext::STRUCT() { +tree::TerminalNode* CypherParser::RU_StructTypeContext::STRUCT() { return getToken(CypherParser::STRUCT, 0); } -CypherParser::KU_ColumnDefinitionsContext* CypherParser::KU_StructTypeContext::kU_ColumnDefinitions() { - return getRuleContext(0); +CypherParser::RU_ColumnDefinitionsContext* CypherParser::RU_StructTypeContext::rU_ColumnDefinitions() { + return getRuleContext(0); } -std::vector CypherParser::KU_StructTypeContext::SP() { +std::vector CypherParser::RU_StructTypeContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_StructTypeContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_StructTypeContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_StructTypeContext::getRuleIndex() const { - return CypherParser::RuleKU_StructType; +size_t CypherParser::RU_StructTypeContext::getRuleIndex() const { + return CypherParser::RuleRU_StructType; } -CypherParser::KU_StructTypeContext* CypherParser::kU_StructType() { - KU_StructTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 108, CypherParser::RuleKU_StructType); +CypherParser::RU_StructTypeContext* CypherParser::rU_StructType() { + RU_StructTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 108, CypherParser::RuleRU_StructType); size_t _la = 0; #if __cplusplus > 201703L @@ -6986,7 +6986,7 @@ CypherParser::KU_StructTypeContext* CypherParser::kU_StructType() { match(CypherParser::SP); } setState(1211); - kU_ColumnDefinitions(); + rU_ColumnDefinitions(); setState(1213); _errHandler->sync(this); @@ -7008,41 +7008,41 @@ CypherParser::KU_StructTypeContext* CypherParser::kU_StructType() { return _localctx; } -//----------------- KU_MapTypeContext ------------------------------------------------------------------ +//----------------- RU_MapTypeContext ------------------------------------------------------------------ -CypherParser::KU_MapTypeContext::KU_MapTypeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_MapTypeContext::RU_MapTypeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_MapTypeContext::MAP() { +tree::TerminalNode* CypherParser::RU_MapTypeContext::MAP() { return getToken(CypherParser::MAP, 0); } -std::vector CypherParser::KU_MapTypeContext::kU_DataType() { - return getRuleContexts(); +std::vector CypherParser::RU_MapTypeContext::rU_DataType() { + return getRuleContexts(); } -CypherParser::KU_DataTypeContext* CypherParser::KU_MapTypeContext::kU_DataType(size_t i) { - return getRuleContext(i); +CypherParser::RU_DataTypeContext* CypherParser::RU_MapTypeContext::rU_DataType(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_MapTypeContext::SP() { +std::vector CypherParser::RU_MapTypeContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_MapTypeContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_MapTypeContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_MapTypeContext::getRuleIndex() const { - return CypherParser::RuleKU_MapType; +size_t CypherParser::RU_MapTypeContext::getRuleIndex() const { + return CypherParser::RuleRU_MapType; } -CypherParser::KU_MapTypeContext* CypherParser::kU_MapType() { - KU_MapTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 110, CypherParser::RuleKU_MapType); +CypherParser::RU_MapTypeContext* CypherParser::rU_MapType() { + RU_MapTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 110, CypherParser::RuleRU_MapType); size_t _la = 0; #if __cplusplus > 201703L @@ -7075,7 +7075,7 @@ CypherParser::KU_MapTypeContext* CypherParser::kU_MapType() { match(CypherParser::SP); } setState(1225); - kU_DataType(0); + rU_DataType(0); setState(1227); _errHandler->sync(this); @@ -7095,7 +7095,7 @@ CypherParser::KU_MapTypeContext* CypherParser::kU_MapType() { match(CypherParser::SP); } setState(1233); - kU_DataType(0); + rU_DataType(0); setState(1235); _errHandler->sync(this); @@ -7117,41 +7117,41 @@ CypherParser::KU_MapTypeContext* CypherParser::kU_MapType() { return _localctx; } -//----------------- KU_DecimalTypeContext ------------------------------------------------------------------ +//----------------- RU_DecimalTypeContext ------------------------------------------------------------------ -CypherParser::KU_DecimalTypeContext::KU_DecimalTypeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DecimalTypeContext::RU_DecimalTypeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_DecimalTypeContext::DECIMAL() { +tree::TerminalNode* CypherParser::RU_DecimalTypeContext::DECIMAL() { return getToken(CypherParser::DECIMAL, 0); } -std::vector CypherParser::KU_DecimalTypeContext::oC_IntegerLiteral() { +std::vector CypherParser::RU_DecimalTypeContext::oC_IntegerLiteral() { return getRuleContexts(); } -CypherParser::OC_IntegerLiteralContext* CypherParser::KU_DecimalTypeContext::oC_IntegerLiteral(size_t i) { +CypherParser::OC_IntegerLiteralContext* CypherParser::RU_DecimalTypeContext::oC_IntegerLiteral(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_DecimalTypeContext::SP() { +std::vector CypherParser::RU_DecimalTypeContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_DecimalTypeContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_DecimalTypeContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_DecimalTypeContext::getRuleIndex() const { - return CypherParser::RuleKU_DecimalType; +size_t CypherParser::RU_DecimalTypeContext::getRuleIndex() const { + return CypherParser::RuleRU_DecimalType; } -CypherParser::KU_DecimalTypeContext* CypherParser::kU_DecimalType() { - KU_DecimalTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 112, CypherParser::RuleKU_DecimalType); +CypherParser::RU_DecimalTypeContext* CypherParser::rU_DecimalType() { + RU_DecimalTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 112, CypherParser::RuleRU_DecimalType); size_t _la = 0; #if __cplusplus > 201703L @@ -7226,59 +7226,59 @@ CypherParser::KU_DecimalTypeContext* CypherParser::kU_DecimalType() { return _localctx; } -//----------------- KU_DataTypeContext ------------------------------------------------------------------ +//----------------- RU_DataTypeContext ------------------------------------------------------------------ -CypherParser::KU_DataTypeContext::KU_DataTypeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_DataTypeContext::RU_DataTypeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_DataTypeContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_DataTypeContext::oC_SymbolicName() { return getRuleContext(0); } -CypherParser::KU_UnionTypeContext* CypherParser::KU_DataTypeContext::kU_UnionType() { - return getRuleContext(0); +CypherParser::RU_UnionTypeContext* CypherParser::RU_DataTypeContext::rU_UnionType() { + return getRuleContext(0); } -CypherParser::KU_StructTypeContext* CypherParser::KU_DataTypeContext::kU_StructType() { - return getRuleContext(0); +CypherParser::RU_StructTypeContext* CypherParser::RU_DataTypeContext::rU_StructType() { + return getRuleContext(0); } -CypherParser::KU_MapTypeContext* CypherParser::KU_DataTypeContext::kU_MapType() { - return getRuleContext(0); +CypherParser::RU_MapTypeContext* CypherParser::RU_DataTypeContext::rU_MapType() { + return getRuleContext(0); } -CypherParser::KU_DecimalTypeContext* CypherParser::KU_DataTypeContext::kU_DecimalType() { - return getRuleContext(0); +CypherParser::RU_DecimalTypeContext* CypherParser::RU_DataTypeContext::rU_DecimalType() { + return getRuleContext(0); } -CypherParser::KU_DataTypeContext* CypherParser::KU_DataTypeContext::kU_DataType() { - return getRuleContext(0); +CypherParser::RU_DataTypeContext* CypherParser::RU_DataTypeContext::rU_DataType() { + return getRuleContext(0); } -CypherParser::KU_ListIdentifiersContext* CypherParser::KU_DataTypeContext::kU_ListIdentifiers() { - return getRuleContext(0); +CypherParser::RU_ListIdentifiersContext* CypherParser::RU_DataTypeContext::rU_ListIdentifiers() { + return getRuleContext(0); } -size_t CypherParser::KU_DataTypeContext::getRuleIndex() const { - return CypherParser::RuleKU_DataType; +size_t CypherParser::RU_DataTypeContext::getRuleIndex() const { + return CypherParser::RuleRU_DataType; } -CypherParser::KU_DataTypeContext* CypherParser::kU_DataType() { - return kU_DataType(0); +CypherParser::RU_DataTypeContext* CypherParser::rU_DataType() { + return rU_DataType(0); } -CypherParser::KU_DataTypeContext* CypherParser::kU_DataType(int precedence) { +CypherParser::RU_DataTypeContext* CypherParser::rU_DataType(int precedence) { ParserRuleContext *parentContext = _ctx; size_t parentState = getState(); - CypherParser::KU_DataTypeContext *_localctx = _tracker.createInstance(_ctx, parentState); - CypherParser::KU_DataTypeContext *previousContext = _localctx; + CypherParser::RU_DataTypeContext *_localctx = _tracker.createInstance(_ctx, parentState); + CypherParser::RU_DataTypeContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. size_t startState = 114; - enterRecursionRule(_localctx, 114, CypherParser::RuleKU_DataType, precedence); + enterRecursionRule(_localctx, 114, CypherParser::RuleRU_DataType, precedence); @@ -7303,25 +7303,25 @@ CypherParser::KU_DataTypeContext* CypherParser::kU_DataType(int precedence) { case 2: { setState(1263); - kU_UnionType(); + rU_UnionType(); break; } case 3: { setState(1264); - kU_StructType(); + rU_StructType(); break; } case 4: { setState(1265); - kU_MapType(); + rU_MapType(); break; } case 5: { setState(1266); - kU_DecimalType(); + rU_DecimalType(); break; } @@ -7337,13 +7337,13 @@ CypherParser::KU_DataTypeContext* CypherParser::kU_DataType(int precedence) { if (!_parseListeners.empty()) triggerExitRuleEvent(); previousContext = _localctx; - _localctx = _tracker.createInstance(parentContext, parentState); - pushNewRecursionContext(_localctx, startState, RuleKU_DataType); + _localctx = _tracker.createInstance(parentContext, parentState); + pushNewRecursionContext(_localctx, startState, RuleRU_DataType); setState(1269); if (!(precpred(_ctx, 5))) throw FailedPredicateException(this, "precpred(_ctx, 5)"); setState(1270); - kU_ListIdentifiers(); + rU_ListIdentifiers(); } setState(1275); _errHandler->sync(this); @@ -7358,29 +7358,29 @@ CypherParser::KU_DataTypeContext* CypherParser::kU_DataType(int precedence) { return _localctx; } -//----------------- KU_ListIdentifiersContext ------------------------------------------------------------------ +//----------------- RU_ListIdentifiersContext ------------------------------------------------------------------ -CypherParser::KU_ListIdentifiersContext::KU_ListIdentifiersContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ListIdentifiersContext::RU_ListIdentifiersContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_ListIdentifiersContext::kU_ListIdentifier() { - return getRuleContexts(); +std::vector CypherParser::RU_ListIdentifiersContext::rU_ListIdentifier() { + return getRuleContexts(); } -CypherParser::KU_ListIdentifierContext* CypherParser::KU_ListIdentifiersContext::kU_ListIdentifier(size_t i) { - return getRuleContext(i); +CypherParser::RU_ListIdentifierContext* CypherParser::RU_ListIdentifiersContext::rU_ListIdentifier(size_t i) { + return getRuleContext(i); } -size_t CypherParser::KU_ListIdentifiersContext::getRuleIndex() const { - return CypherParser::RuleKU_ListIdentifiers; +size_t CypherParser::RU_ListIdentifiersContext::getRuleIndex() const { + return CypherParser::RuleRU_ListIdentifiers; } -CypherParser::KU_ListIdentifiersContext* CypherParser::kU_ListIdentifiers() { - KU_ListIdentifiersContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 116, CypherParser::RuleKU_ListIdentifiers); +CypherParser::RU_ListIdentifiersContext* CypherParser::rU_ListIdentifiers() { + RU_ListIdentifiersContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 116, CypherParser::RuleRU_ListIdentifiers); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7393,14 +7393,14 @@ CypherParser::KU_ListIdentifiersContext* CypherParser::kU_ListIdentifiers() { size_t alt; enterOuterAlt(_localctx, 1); setState(1276); - kU_ListIdentifier(); + rU_ListIdentifier(); setState(1280); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 157, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { setState(1277); - kU_ListIdentifier(); + rU_ListIdentifier(); } setState(1282); _errHandler->sync(this); @@ -7417,25 +7417,25 @@ CypherParser::KU_ListIdentifiersContext* CypherParser::kU_ListIdentifiers() { return _localctx; } -//----------------- KU_ListIdentifierContext ------------------------------------------------------------------ +//----------------- RU_ListIdentifierContext ------------------------------------------------------------------ -CypherParser::KU_ListIdentifierContext::KU_ListIdentifierContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ListIdentifierContext::RU_ListIdentifierContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::OC_IntegerLiteralContext* CypherParser::KU_ListIdentifierContext::oC_IntegerLiteral() { +CypherParser::OC_IntegerLiteralContext* CypherParser::RU_ListIdentifierContext::oC_IntegerLiteral() { return getRuleContext(0); } -size_t CypherParser::KU_ListIdentifierContext::getRuleIndex() const { - return CypherParser::RuleKU_ListIdentifier; +size_t CypherParser::RU_ListIdentifierContext::getRuleIndex() const { + return CypherParser::RuleRU_ListIdentifier; } -CypherParser::KU_ListIdentifierContext* CypherParser::kU_ListIdentifier() { - KU_ListIdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 118, CypherParser::RuleKU_ListIdentifier); +CypherParser::RU_ListIdentifierContext* CypherParser::rU_ListIdentifier() { + RU_ListIdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 118, CypherParser::RuleRU_ListIdentifier); size_t _la = 0; #if __cplusplus > 201703L @@ -7640,57 +7640,57 @@ CypherParser::OC_ProfileContext* CypherParser::oC_Profile() { return _localctx; } -//----------------- KU_TransactionContext ------------------------------------------------------------------ +//----------------- RU_TransactionContext ------------------------------------------------------------------ -CypherParser::KU_TransactionContext::KU_TransactionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_TransactionContext::RU_TransactionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_TransactionContext::BEGIN() { +tree::TerminalNode* CypherParser::RU_TransactionContext::BEGIN() { return getToken(CypherParser::BEGIN, 0); } -std::vector CypherParser::KU_TransactionContext::SP() { +std::vector CypherParser::RU_TransactionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_TransactionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_TransactionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_TransactionContext::TRANSACTION() { +tree::TerminalNode* CypherParser::RU_TransactionContext::TRANSACTION() { return getToken(CypherParser::TRANSACTION, 0); } -tree::TerminalNode* CypherParser::KU_TransactionContext::READ() { +tree::TerminalNode* CypherParser::RU_TransactionContext::READ() { return getToken(CypherParser::READ, 0); } -tree::TerminalNode* CypherParser::KU_TransactionContext::ONLY() { +tree::TerminalNode* CypherParser::RU_TransactionContext::ONLY() { return getToken(CypherParser::ONLY, 0); } -tree::TerminalNode* CypherParser::KU_TransactionContext::COMMIT() { +tree::TerminalNode* CypherParser::RU_TransactionContext::COMMIT() { return getToken(CypherParser::COMMIT, 0); } -tree::TerminalNode* CypherParser::KU_TransactionContext::ROLLBACK() { +tree::TerminalNode* CypherParser::RU_TransactionContext::ROLLBACK() { return getToken(CypherParser::ROLLBACK, 0); } -tree::TerminalNode* CypherParser::KU_TransactionContext::CHECKPOINT() { +tree::TerminalNode* CypherParser::RU_TransactionContext::CHECKPOINT() { return getToken(CypherParser::CHECKPOINT, 0); } -size_t CypherParser::KU_TransactionContext::getRuleIndex() const { - return CypherParser::RuleKU_Transaction; +size_t CypherParser::RU_TransactionContext::getRuleIndex() const { + return CypherParser::RuleRU_Transaction; } -CypherParser::KU_TransactionContext* CypherParser::kU_Transaction() { - KU_TransactionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 126, CypherParser::RuleKU_Transaction); +CypherParser::RU_TransactionContext* CypherParser::rU_Transaction() { + RU_TransactionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 126, CypherParser::RuleRU_Transaction); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7768,37 +7768,37 @@ CypherParser::KU_TransactionContext* CypherParser::kU_Transaction() { return _localctx; } -//----------------- KU_ExtensionContext ------------------------------------------------------------------ +//----------------- RU_ExtensionContext ------------------------------------------------------------------ -CypherParser::KU_ExtensionContext::KU_ExtensionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ExtensionContext::RU_ExtensionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::KU_LoadExtensionContext* CypherParser::KU_ExtensionContext::kU_LoadExtension() { - return getRuleContext(0); +CypherParser::RU_LoadExtensionContext* CypherParser::RU_ExtensionContext::rU_LoadExtension() { + return getRuleContext(0); } -CypherParser::KU_InstallExtensionContext* CypherParser::KU_ExtensionContext::kU_InstallExtension() { - return getRuleContext(0); +CypherParser::RU_InstallExtensionContext* CypherParser::RU_ExtensionContext::rU_InstallExtension() { + return getRuleContext(0); } -CypherParser::KU_UninstallExtensionContext* CypherParser::KU_ExtensionContext::kU_UninstallExtension() { - return getRuleContext(0); +CypherParser::RU_UninstallExtensionContext* CypherParser::RU_ExtensionContext::rU_UninstallExtension() { + return getRuleContext(0); } -CypherParser::KU_UpdateExtensionContext* CypherParser::KU_ExtensionContext::kU_UpdateExtension() { - return getRuleContext(0); +CypherParser::RU_UpdateExtensionContext* CypherParser::RU_ExtensionContext::rU_UpdateExtension() { + return getRuleContext(0); } -size_t CypherParser::KU_ExtensionContext::getRuleIndex() const { - return CypherParser::RuleKU_Extension; +size_t CypherParser::RU_ExtensionContext::getRuleIndex() const { + return CypherParser::RuleRU_Extension; } -CypherParser::KU_ExtensionContext* CypherParser::kU_Extension() { - KU_ExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 128, CypherParser::RuleKU_Extension); +CypherParser::RU_ExtensionContext* CypherParser::rU_Extension() { + RU_ExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 128, CypherParser::RuleRU_Extension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7814,7 +7814,7 @@ CypherParser::KU_ExtensionContext* CypherParser::kU_Extension() { case CypherParser::LOAD: { enterOuterAlt(_localctx, 1); setState(1315); - kU_LoadExtension(); + rU_LoadExtension(); break; } @@ -7822,21 +7822,21 @@ CypherParser::KU_ExtensionContext* CypherParser::kU_Extension() { case CypherParser::INSTALL: { enterOuterAlt(_localctx, 2); setState(1316); - kU_InstallExtension(); + rU_InstallExtension(); break; } case CypherParser::UNINSTALL: { enterOuterAlt(_localctx, 3); setState(1317); - kU_UninstallExtension(); + rU_UninstallExtension(); break; } case CypherParser::UPDATE: { enterOuterAlt(_localctx, 4); setState(1318); - kU_UpdateExtension(); + rU_UpdateExtension(); break; } @@ -7854,45 +7854,45 @@ CypherParser::KU_ExtensionContext* CypherParser::kU_Extension() { return _localctx; } -//----------------- KU_LoadExtensionContext ------------------------------------------------------------------ +//----------------- RU_LoadExtensionContext ------------------------------------------------------------------ -CypherParser::KU_LoadExtensionContext::KU_LoadExtensionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_LoadExtensionContext::RU_LoadExtensionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_LoadExtensionContext::LOAD() { +tree::TerminalNode* CypherParser::RU_LoadExtensionContext::LOAD() { return getToken(CypherParser::LOAD, 0); } -std::vector CypherParser::KU_LoadExtensionContext::SP() { +std::vector CypherParser::RU_LoadExtensionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_LoadExtensionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_LoadExtensionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_LoadExtensionContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_LoadExtensionContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -CypherParser::OC_VariableContext* CypherParser::KU_LoadExtensionContext::oC_Variable() { +CypherParser::OC_VariableContext* CypherParser::RU_LoadExtensionContext::oC_Variable() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_LoadExtensionContext::EXTENSION() { +tree::TerminalNode* CypherParser::RU_LoadExtensionContext::EXTENSION() { return getToken(CypherParser::EXTENSION, 0); } -size_t CypherParser::KU_LoadExtensionContext::getRuleIndex() const { - return CypherParser::RuleKU_LoadExtension; +size_t CypherParser::RU_LoadExtensionContext::getRuleIndex() const { + return CypherParser::RuleRU_LoadExtension; } -CypherParser::KU_LoadExtensionContext* CypherParser::kU_LoadExtension() { - KU_LoadExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 130, CypherParser::RuleKU_LoadExtension); +CypherParser::RU_LoadExtensionContext* CypherParser::rU_LoadExtension() { + RU_LoadExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 130, CypherParser::RuleRU_LoadExtension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -8015,49 +8015,49 @@ CypherParser::KU_LoadExtensionContext* CypherParser::kU_LoadExtension() { return _localctx; } -//----------------- KU_InstallExtensionContext ------------------------------------------------------------------ +//----------------- RU_InstallExtensionContext ------------------------------------------------------------------ -CypherParser::KU_InstallExtensionContext::KU_InstallExtensionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_InstallExtensionContext::RU_InstallExtensionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_InstallExtensionContext::INSTALL() { +tree::TerminalNode* CypherParser::RU_InstallExtensionContext::INSTALL() { return getToken(CypherParser::INSTALL, 0); } -std::vector CypherParser::KU_InstallExtensionContext::SP() { +std::vector CypherParser::RU_InstallExtensionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_InstallExtensionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_InstallExtensionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_VariableContext* CypherParser::KU_InstallExtensionContext::oC_Variable() { +CypherParser::OC_VariableContext* CypherParser::RU_InstallExtensionContext::oC_Variable() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_InstallExtensionContext::FORCE() { +tree::TerminalNode* CypherParser::RU_InstallExtensionContext::FORCE() { return getToken(CypherParser::FORCE, 0); } -tree::TerminalNode* CypherParser::KU_InstallExtensionContext::FROM() { +tree::TerminalNode* CypherParser::RU_InstallExtensionContext::FROM() { return getToken(CypherParser::FROM, 0); } -tree::TerminalNode* CypherParser::KU_InstallExtensionContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_InstallExtensionContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -size_t CypherParser::KU_InstallExtensionContext::getRuleIndex() const { - return CypherParser::RuleKU_InstallExtension; +size_t CypherParser::RU_InstallExtensionContext::getRuleIndex() const { + return CypherParser::RuleRU_InstallExtension; } -CypherParser::KU_InstallExtensionContext* CypherParser::kU_InstallExtension() { - KU_InstallExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 132, CypherParser::RuleKU_InstallExtension); +CypherParser::RU_InstallExtensionContext* CypherParser::rU_InstallExtension() { + RU_InstallExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 132, CypherParser::RuleRU_InstallExtension); size_t _la = 0; #if __cplusplus > 201703L @@ -8115,33 +8115,33 @@ CypherParser::KU_InstallExtensionContext* CypherParser::kU_InstallExtension() { return _localctx; } -//----------------- KU_UninstallExtensionContext ------------------------------------------------------------------ +//----------------- RU_UninstallExtensionContext ------------------------------------------------------------------ -CypherParser::KU_UninstallExtensionContext::KU_UninstallExtensionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_UninstallExtensionContext::RU_UninstallExtensionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_UninstallExtensionContext::UNINSTALL() { +tree::TerminalNode* CypherParser::RU_UninstallExtensionContext::UNINSTALL() { return getToken(CypherParser::UNINSTALL, 0); } -tree::TerminalNode* CypherParser::KU_UninstallExtensionContext::SP() { +tree::TerminalNode* CypherParser::RU_UninstallExtensionContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::OC_VariableContext* CypherParser::KU_UninstallExtensionContext::oC_Variable() { +CypherParser::OC_VariableContext* CypherParser::RU_UninstallExtensionContext::oC_Variable() { return getRuleContext(0); } -size_t CypherParser::KU_UninstallExtensionContext::getRuleIndex() const { - return CypherParser::RuleKU_UninstallExtension; +size_t CypherParser::RU_UninstallExtensionContext::getRuleIndex() const { + return CypherParser::RuleRU_UninstallExtension; } -CypherParser::KU_UninstallExtensionContext* CypherParser::kU_UninstallExtension() { - KU_UninstallExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 134, CypherParser::RuleKU_UninstallExtension); +CypherParser::RU_UninstallExtensionContext* CypherParser::rU_UninstallExtension() { + RU_UninstallExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 134, CypherParser::RuleRU_UninstallExtension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -8169,33 +8169,33 @@ CypherParser::KU_UninstallExtensionContext* CypherParser::kU_UninstallExtension( return _localctx; } -//----------------- KU_UpdateExtensionContext ------------------------------------------------------------------ +//----------------- RU_UpdateExtensionContext ------------------------------------------------------------------ -CypherParser::KU_UpdateExtensionContext::KU_UpdateExtensionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_UpdateExtensionContext::RU_UpdateExtensionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_UpdateExtensionContext::UPDATE() { +tree::TerminalNode* CypherParser::RU_UpdateExtensionContext::UPDATE() { return getToken(CypherParser::UPDATE, 0); } -tree::TerminalNode* CypherParser::KU_UpdateExtensionContext::SP() { +tree::TerminalNode* CypherParser::RU_UpdateExtensionContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::OC_VariableContext* CypherParser::KU_UpdateExtensionContext::oC_Variable() { +CypherParser::OC_VariableContext* CypherParser::RU_UpdateExtensionContext::oC_Variable() { return getRuleContext(0); } -size_t CypherParser::KU_UpdateExtensionContext::getRuleIndex() const { - return CypherParser::RuleKU_UpdateExtension; +size_t CypherParser::RU_UpdateExtensionContext::getRuleIndex() const { + return CypherParser::RuleRU_UpdateExtension; } -CypherParser::KU_UpdateExtensionContext* CypherParser::kU_UpdateExtension() { - KU_UpdateExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 136, CypherParser::RuleKU_UpdateExtension); +CypherParser::RU_UpdateExtensionContext* CypherParser::rU_UpdateExtension() { + RU_UpdateExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 136, CypherParser::RuleRU_UpdateExtension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -8734,12 +8734,12 @@ CypherParser::OC_SinglePartQueryContext* CypherParser::OC_MultiPartQueryContext: return getRuleContext(0); } -std::vector CypherParser::OC_MultiPartQueryContext::kU_QueryPart() { - return getRuleContexts(); +std::vector CypherParser::OC_MultiPartQueryContext::rU_QueryPart() { + return getRuleContexts(); } -CypherParser::KU_QueryPartContext* CypherParser::OC_MultiPartQueryContext::kU_QueryPart(size_t i) { - return getRuleContext(i); +CypherParser::RU_QueryPartContext* CypherParser::OC_MultiPartQueryContext::rU_QueryPart(size_t i) { + return getRuleContext(i); } std::vector CypherParser::OC_MultiPartQueryContext::SP() { @@ -8778,7 +8778,7 @@ CypherParser::OC_MultiPartQueryContext* CypherParser::oC_MultiPartQuery() { switch (alt) { case 1: { setState(1432); - kU_QueryPart(); + rU_QueryPart(); setState(1434); _errHandler->sync(this); @@ -8810,49 +8810,49 @@ CypherParser::OC_MultiPartQueryContext* CypherParser::oC_MultiPartQuery() { return _localctx; } -//----------------- KU_QueryPartContext ------------------------------------------------------------------ +//----------------- RU_QueryPartContext ------------------------------------------------------------------ -CypherParser::KU_QueryPartContext::KU_QueryPartContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_QueryPartContext::RU_QueryPartContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::OC_WithContext* CypherParser::KU_QueryPartContext::oC_With() { +CypherParser::OC_WithContext* CypherParser::RU_QueryPartContext::oC_With() { return getRuleContext(0); } -std::vector CypherParser::KU_QueryPartContext::oC_ReadingClause() { +std::vector CypherParser::RU_QueryPartContext::oC_ReadingClause() { return getRuleContexts(); } -CypherParser::OC_ReadingClauseContext* CypherParser::KU_QueryPartContext::oC_ReadingClause(size_t i) { +CypherParser::OC_ReadingClauseContext* CypherParser::RU_QueryPartContext::oC_ReadingClause(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_QueryPartContext::oC_UpdatingClause() { +std::vector CypherParser::RU_QueryPartContext::oC_UpdatingClause() { return getRuleContexts(); } -CypherParser::OC_UpdatingClauseContext* CypherParser::KU_QueryPartContext::oC_UpdatingClause(size_t i) { +CypherParser::OC_UpdatingClauseContext* CypherParser::RU_QueryPartContext::oC_UpdatingClause(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_QueryPartContext::SP() { +std::vector CypherParser::RU_QueryPartContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_QueryPartContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_QueryPartContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_QueryPartContext::getRuleIndex() const { - return CypherParser::RuleKU_QueryPart; +size_t CypherParser::RU_QueryPartContext::getRuleIndex() const { + return CypherParser::RuleRU_QueryPart; } -CypherParser::KU_QueryPartContext* CypherParser::kU_QueryPart() { - KU_QueryPartContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 150, CypherParser::RuleKU_QueryPart); +CypherParser::RU_QueryPartContext* CypherParser::rU_QueryPart() { + RU_QueryPartContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 150, CypherParser::RuleRU_QueryPart); size_t _la = 0; #if __cplusplus > 201703L @@ -9015,12 +9015,12 @@ CypherParser::OC_UnwindContext* CypherParser::OC_ReadingClauseContext::oC_Unwind return getRuleContext(0); } -CypherParser::KU_InQueryCallContext* CypherParser::OC_ReadingClauseContext::kU_InQueryCall() { - return getRuleContext(0); +CypherParser::RU_InQueryCallContext* CypherParser::OC_ReadingClauseContext::rU_InQueryCall() { + return getRuleContext(0); } -CypherParser::KU_LoadFromContext* CypherParser::OC_ReadingClauseContext::kU_LoadFrom() { - return getRuleContext(0); +CypherParser::RU_LoadFromContext* CypherParser::OC_ReadingClauseContext::rU_LoadFrom() { + return getRuleContext(0); } @@ -9062,14 +9062,14 @@ CypherParser::OC_ReadingClauseContext* CypherParser::oC_ReadingClause() { case CypherParser::CALL: { enterOuterAlt(_localctx, 3); setState(1470); - kU_InQueryCall(); + rU_InQueryCall(); break; } case CypherParser::LOAD: { enterOuterAlt(_localctx, 4); setState(1471); - kU_LoadFrom(); + rU_LoadFrom(); break; } @@ -9087,61 +9087,61 @@ CypherParser::OC_ReadingClauseContext* CypherParser::oC_ReadingClause() { return _localctx; } -//----------------- KU_LoadFromContext ------------------------------------------------------------------ +//----------------- RU_LoadFromContext ------------------------------------------------------------------ -CypherParser::KU_LoadFromContext::KU_LoadFromContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_LoadFromContext::RU_LoadFromContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_LoadFromContext::LOAD() { +tree::TerminalNode* CypherParser::RU_LoadFromContext::LOAD() { return getToken(CypherParser::LOAD, 0); } -std::vector CypherParser::KU_LoadFromContext::SP() { +std::vector CypherParser::RU_LoadFromContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_LoadFromContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_LoadFromContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_LoadFromContext::FROM() { +tree::TerminalNode* CypherParser::RU_LoadFromContext::FROM() { return getToken(CypherParser::FROM, 0); } -CypherParser::KU_ScanSourceContext* CypherParser::KU_LoadFromContext::kU_ScanSource() { - return getRuleContext(0); +CypherParser::RU_ScanSourceContext* CypherParser::RU_LoadFromContext::rU_ScanSource() { + return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_LoadFromContext::WITH() { +tree::TerminalNode* CypherParser::RU_LoadFromContext::WITH() { return getToken(CypherParser::WITH, 0); } -tree::TerminalNode* CypherParser::KU_LoadFromContext::HEADERS() { +tree::TerminalNode* CypherParser::RU_LoadFromContext::HEADERS() { return getToken(CypherParser::HEADERS, 0); } -CypherParser::KU_ColumnDefinitionsContext* CypherParser::KU_LoadFromContext::kU_ColumnDefinitions() { - return getRuleContext(0); +CypherParser::RU_ColumnDefinitionsContext* CypherParser::RU_LoadFromContext::rU_ColumnDefinitions() { + return getRuleContext(0); } -CypherParser::KU_OptionsContext* CypherParser::KU_LoadFromContext::kU_Options() { - return getRuleContext(0); +CypherParser::RU_OptionsContext* CypherParser::RU_LoadFromContext::rU_Options() { + return getRuleContext(0); } -CypherParser::OC_WhereContext* CypherParser::KU_LoadFromContext::oC_Where() { +CypherParser::OC_WhereContext* CypherParser::RU_LoadFromContext::oC_Where() { return getRuleContext(0); } -size_t CypherParser::KU_LoadFromContext::getRuleIndex() const { - return CypherParser::RuleKU_LoadFrom; +size_t CypherParser::RU_LoadFromContext::getRuleIndex() const { + return CypherParser::RuleRU_LoadFrom; } -CypherParser::KU_LoadFromContext* CypherParser::kU_LoadFrom() { - KU_LoadFromContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 156, CypherParser::RuleKU_LoadFrom); +CypherParser::RU_LoadFromContext* CypherParser::rU_LoadFrom() { + RU_LoadFromContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 156, CypherParser::RuleRU_LoadFrom); size_t _la = 0; #if __cplusplus > 201703L @@ -9187,7 +9187,7 @@ CypherParser::KU_LoadFromContext* CypherParser::kU_LoadFrom() { match(CypherParser::SP); } setState(1486); - kU_ColumnDefinitions(); + rU_ColumnDefinitions(); setState(1488); _errHandler->sync(this); @@ -9211,7 +9211,7 @@ CypherParser::KU_LoadFromContext* CypherParser::kU_LoadFrom() { setState(1496); match(CypherParser::SP); setState(1497); - kU_ScanSource(); + rU_ScanSource(); setState(1511); _errHandler->sync(this); @@ -9236,7 +9236,7 @@ CypherParser::KU_LoadFromContext* CypherParser::kU_LoadFrom() { match(CypherParser::SP); } setState(1505); - kU_Options(); + rU_Options(); setState(1507); _errHandler->sync(this); @@ -9448,49 +9448,49 @@ CypherParser::OC_YieldItemsContext* CypherParser::oC_YieldItems() { return _localctx; } -//----------------- KU_InQueryCallContext ------------------------------------------------------------------ +//----------------- RU_InQueryCallContext ------------------------------------------------------------------ -CypherParser::KU_InQueryCallContext::KU_InQueryCallContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_InQueryCallContext::RU_InQueryCallContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_InQueryCallContext::CALL() { +tree::TerminalNode* CypherParser::RU_InQueryCallContext::CALL() { return getToken(CypherParser::CALL, 0); } -std::vector CypherParser::KU_InQueryCallContext::SP() { +std::vector CypherParser::RU_InQueryCallContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_InQueryCallContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_InQueryCallContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_FunctionInvocationContext* CypherParser::KU_InQueryCallContext::oC_FunctionInvocation() { +CypherParser::OC_FunctionInvocationContext* CypherParser::RU_InQueryCallContext::oC_FunctionInvocation() { return getRuleContext(0); } -CypherParser::OC_WhereContext* CypherParser::KU_InQueryCallContext::oC_Where() { +CypherParser::OC_WhereContext* CypherParser::RU_InQueryCallContext::oC_Where() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_InQueryCallContext::YIELD() { +tree::TerminalNode* CypherParser::RU_InQueryCallContext::YIELD() { return getToken(CypherParser::YIELD, 0); } -CypherParser::OC_YieldItemsContext* CypherParser::KU_InQueryCallContext::oC_YieldItems() { +CypherParser::OC_YieldItemsContext* CypherParser::RU_InQueryCallContext::oC_YieldItems() { return getRuleContext(0); } -size_t CypherParser::KU_InQueryCallContext::getRuleIndex() const { - return CypherParser::RuleKU_InQueryCall; +size_t CypherParser::RU_InQueryCallContext::getRuleIndex() const { + return CypherParser::RuleRU_InQueryCall; } -CypherParser::KU_InQueryCallContext* CypherParser::kU_InQueryCall() { - KU_InQueryCallContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 162, CypherParser::RuleKU_InQueryCall); +CypherParser::RU_InQueryCallContext* CypherParser::rU_InQueryCall() { + RU_InQueryCallContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 162, CypherParser::RuleRU_InQueryCall); size_t _la = 0; #if __cplusplus > 201703L @@ -9595,8 +9595,8 @@ CypherParser::OC_WhereContext* CypherParser::OC_MatchContext::oC_Where() { return getRuleContext(0); } -CypherParser::KU_HintContext* CypherParser::OC_MatchContext::kU_Hint() { - return getRuleContext(0); +CypherParser::RU_HintContext* CypherParser::OC_MatchContext::rU_Hint() { + return getRuleContext(0); } @@ -9664,7 +9664,7 @@ CypherParser::OC_MatchContext* CypherParser::oC_Match() { setState(1572); match(CypherParser::SP); setState(1573); - kU_Hint(); + rU_Hint(); break; } @@ -9682,33 +9682,33 @@ CypherParser::OC_MatchContext* CypherParser::oC_Match() { return _localctx; } -//----------------- KU_HintContext ------------------------------------------------------------------ +//----------------- RU_HintContext ------------------------------------------------------------------ -CypherParser::KU_HintContext::KU_HintContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_HintContext::RU_HintContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_HintContext::HINT() { +tree::TerminalNode* CypherParser::RU_HintContext::HINT() { return getToken(CypherParser::HINT, 0); } -tree::TerminalNode* CypherParser::KU_HintContext::SP() { +tree::TerminalNode* CypherParser::RU_HintContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::KU_JoinNodeContext* CypherParser::KU_HintContext::kU_JoinNode() { - return getRuleContext(0); +CypherParser::RU_JoinNodeContext* CypherParser::RU_HintContext::rU_JoinNode() { + return getRuleContext(0); } -size_t CypherParser::KU_HintContext::getRuleIndex() const { - return CypherParser::RuleKU_Hint; +size_t CypherParser::RU_HintContext::getRuleIndex() const { + return CypherParser::RuleRU_Hint; } -CypherParser::KU_HintContext* CypherParser::kU_Hint() { - KU_HintContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 166, CypherParser::RuleKU_Hint); +CypherParser::RU_HintContext* CypherParser::rU_Hint() { + RU_HintContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 166, CypherParser::RuleRU_Hint); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9724,7 +9724,7 @@ CypherParser::KU_HintContext* CypherParser::kU_Hint() { setState(1577); match(CypherParser::SP); setState(1578); - kU_JoinNode(0); + rU_JoinNode(0); } catch (RecognitionException &e) { @@ -9736,67 +9736,67 @@ CypherParser::KU_HintContext* CypherParser::kU_Hint() { return _localctx; } -//----------------- KU_JoinNodeContext ------------------------------------------------------------------ +//----------------- RU_JoinNodeContext ------------------------------------------------------------------ -CypherParser::KU_JoinNodeContext::KU_JoinNodeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_JoinNodeContext::RU_JoinNodeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_JoinNodeContext::kU_JoinNode() { - return getRuleContexts(); +std::vector CypherParser::RU_JoinNodeContext::rU_JoinNode() { + return getRuleContexts(); } -CypherParser::KU_JoinNodeContext* CypherParser::KU_JoinNodeContext::kU_JoinNode(size_t i) { - return getRuleContext(i); +CypherParser::RU_JoinNodeContext* CypherParser::RU_JoinNodeContext::rU_JoinNode(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_JoinNodeContext::SP() { +std::vector CypherParser::RU_JoinNodeContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_JoinNodeContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_JoinNodeContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -std::vector CypherParser::KU_JoinNodeContext::oC_SchemaName() { +std::vector CypherParser::RU_JoinNodeContext::oC_SchemaName() { return getRuleContexts(); } -CypherParser::OC_SchemaNameContext* CypherParser::KU_JoinNodeContext::oC_SchemaName(size_t i) { +CypherParser::OC_SchemaNameContext* CypherParser::RU_JoinNodeContext::oC_SchemaName(size_t i) { return getRuleContext(i); } -tree::TerminalNode* CypherParser::KU_JoinNodeContext::JOIN() { +tree::TerminalNode* CypherParser::RU_JoinNodeContext::JOIN() { return getToken(CypherParser::JOIN, 0); } -std::vector CypherParser::KU_JoinNodeContext::MULTI_JOIN() { +std::vector CypherParser::RU_JoinNodeContext::MULTI_JOIN() { return getTokens(CypherParser::MULTI_JOIN); } -tree::TerminalNode* CypherParser::KU_JoinNodeContext::MULTI_JOIN(size_t i) { +tree::TerminalNode* CypherParser::RU_JoinNodeContext::MULTI_JOIN(size_t i) { return getToken(CypherParser::MULTI_JOIN, i); } -size_t CypherParser::KU_JoinNodeContext::getRuleIndex() const { - return CypherParser::RuleKU_JoinNode; +size_t CypherParser::RU_JoinNodeContext::getRuleIndex() const { + return CypherParser::RuleRU_JoinNode; } -CypherParser::KU_JoinNodeContext* CypherParser::kU_JoinNode() { - return kU_JoinNode(0); +CypherParser::RU_JoinNodeContext* CypherParser::rU_JoinNode() { + return rU_JoinNode(0); } -CypherParser::KU_JoinNodeContext* CypherParser::kU_JoinNode(int precedence) { +CypherParser::RU_JoinNodeContext* CypherParser::rU_JoinNode(int precedence) { ParserRuleContext *parentContext = _ctx; size_t parentState = getState(); - CypherParser::KU_JoinNodeContext *_localctx = _tracker.createInstance(_ctx, parentState); - CypherParser::KU_JoinNodeContext *previousContext = _localctx; + CypherParser::RU_JoinNodeContext *_localctx = _tracker.createInstance(_ctx, parentState); + CypherParser::RU_JoinNodeContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. size_t startState = 168; - enterRecursionRule(_localctx, 168, CypherParser::RuleKU_JoinNode, precedence); + enterRecursionRule(_localctx, 168, CypherParser::RuleRU_JoinNode, precedence); size_t _la = 0; @@ -9825,7 +9825,7 @@ CypherParser::KU_JoinNodeContext* CypherParser::kU_JoinNode(int precedence) { match(CypherParser::SP); } setState(1585); - kU_JoinNode(0); + rU_JoinNode(0); setState(1587); _errHandler->sync(this); @@ -9925,8 +9925,8 @@ CypherParser::KU_JoinNodeContext* CypherParser::kU_JoinNode(int precedence) { _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 219, _ctx)) { case 1: { - _localctx = _tracker.createInstance(parentContext, parentState); - pushNewRecursionContext(_localctx, startState, RuleKU_JoinNode); + _localctx = _tracker.createInstance(parentContext, parentState); + pushNewRecursionContext(_localctx, startState, RuleRU_JoinNode); setState(1594); if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)"); @@ -9937,13 +9937,13 @@ CypherParser::KU_JoinNodeContext* CypherParser::kU_JoinNode(int precedence) { setState(1597); match(CypherParser::SP); setState(1598); - kU_JoinNode(5); + rU_JoinNode(5); break; } case 2: { - _localctx = _tracker.createInstance(parentContext, parentState); - pushNewRecursionContext(_localctx, startState, RuleKU_JoinNode); + _localctx = _tracker.createInstance(parentContext, parentState); + pushNewRecursionContext(_localctx, startState, RuleRU_JoinNode); setState(1599); if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)"); @@ -10346,8 +10346,8 @@ CypherParser::OC_AtomContext* CypherParser::OC_SetContext::oC_Atom() { return getRuleContext(0); } -CypherParser::KU_PropertiesContext* CypherParser::OC_SetContext::kU_Properties() { - return getRuleContext(0); +CypherParser::RU_PropertiesContext* CypherParser::OC_SetContext::rU_Properties() { + return getRuleContext(0); } @@ -10453,7 +10453,7 @@ CypherParser::OC_SetContext* CypherParser::oC_Set() { match(CypherParser::SP); } setState(1683); - kU_Properties(); + rU_Properties(); break; } @@ -11981,8 +11981,8 @@ CypherParser::OC_NodeLabelsContext* CypherParser::OC_NodePatternContext::oC_Node return getRuleContext(0); } -CypherParser::KU_PropertiesContext* CypherParser::OC_NodePatternContext::kU_Properties() { - return getRuleContext(0); +CypherParser::RU_PropertiesContext* CypherParser::OC_NodePatternContext::rU_Properties() { + return getRuleContext(0); } @@ -12056,7 +12056,7 @@ CypherParser::OC_NodePatternContext* CypherParser::oC_NodePattern() { _la = _input->LA(1); if (_la == CypherParser::T__8) { setState(1884); - kU_Properties(); + rU_Properties(); setState(1886); _errHandler->sync(this); @@ -12366,12 +12366,12 @@ CypherParser::OC_RelationshipTypesContext* CypherParser::OC_RelationshipDetailCo return getRuleContext(0); } -CypherParser::KU_RecursiveDetailContext* CypherParser::OC_RelationshipDetailContext::kU_RecursiveDetail() { - return getRuleContext(0); +CypherParser::RU_RecursiveDetailContext* CypherParser::OC_RelationshipDetailContext::rU_RecursiveDetail() { + return getRuleContext(0); } -CypherParser::KU_PropertiesContext* CypherParser::OC_RelationshipDetailContext::kU_Properties() { - return getRuleContext(0); +CypherParser::RU_PropertiesContext* CypherParser::OC_RelationshipDetailContext::rU_Properties() { + return getRuleContext(0); } @@ -12445,7 +12445,7 @@ CypherParser::OC_RelationshipDetailContext* CypherParser::oC_RelationshipDetail( _la = _input->LA(1); if (_la == CypherParser::STAR) { setState(1960); - kU_RecursiveDetail(); + rU_RecursiveDetail(); setState(1962); _errHandler->sync(this); @@ -12461,7 +12461,7 @@ CypherParser::OC_RelationshipDetailContext* CypherParser::oC_RelationshipDetail( _la = _input->LA(1); if (_la == CypherParser::T__8) { setState(1966); - kU_Properties(); + rU_Properties(); setState(1968); _errHandler->sync(this); @@ -12484,53 +12484,53 @@ CypherParser::OC_RelationshipDetailContext* CypherParser::oC_RelationshipDetail( return _localctx; } -//----------------- KU_PropertiesContext ------------------------------------------------------------------ +//----------------- RU_PropertiesContext ------------------------------------------------------------------ -CypherParser::KU_PropertiesContext::KU_PropertiesContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_PropertiesContext::RU_PropertiesContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_PropertiesContext::SP() { +std::vector CypherParser::RU_PropertiesContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_PropertiesContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_PropertiesContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -std::vector CypherParser::KU_PropertiesContext::oC_PropertyKeyName() { +std::vector CypherParser::RU_PropertiesContext::oC_PropertyKeyName() { return getRuleContexts(); } -CypherParser::OC_PropertyKeyNameContext* CypherParser::KU_PropertiesContext::oC_PropertyKeyName(size_t i) { +CypherParser::OC_PropertyKeyNameContext* CypherParser::RU_PropertiesContext::oC_PropertyKeyName(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_PropertiesContext::COLON() { +std::vector CypherParser::RU_PropertiesContext::COLON() { return getTokens(CypherParser::COLON); } -tree::TerminalNode* CypherParser::KU_PropertiesContext::COLON(size_t i) { +tree::TerminalNode* CypherParser::RU_PropertiesContext::COLON(size_t i) { return getToken(CypherParser::COLON, i); } -std::vector CypherParser::KU_PropertiesContext::oC_Expression() { +std::vector CypherParser::RU_PropertiesContext::oC_Expression() { return getRuleContexts(); } -CypherParser::OC_ExpressionContext* CypherParser::KU_PropertiesContext::oC_Expression(size_t i) { +CypherParser::OC_ExpressionContext* CypherParser::RU_PropertiesContext::oC_Expression(size_t i) { return getRuleContext(i); } -size_t CypherParser::KU_PropertiesContext::getRuleIndex() const { - return CypherParser::RuleKU_Properties; +size_t CypherParser::RU_PropertiesContext::getRuleIndex() const { + return CypherParser::RuleRU_Properties; } -CypherParser::KU_PropertiesContext* CypherParser::kU_Properties() { - KU_PropertiesContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 220, CypherParser::RuleKU_Properties); +CypherParser::RU_PropertiesContext* CypherParser::rU_Properties() { + RU_PropertiesContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 220, CypherParser::RuleRU_Properties); size_t _la = 0; #if __cplusplus > 201703L @@ -12892,45 +12892,45 @@ CypherParser::OC_NodeLabelsContext* CypherParser::oC_NodeLabels() { return _localctx; } -//----------------- KU_RecursiveDetailContext ------------------------------------------------------------------ +//----------------- RU_RecursiveDetailContext ------------------------------------------------------------------ -CypherParser::KU_RecursiveDetailContext::KU_RecursiveDetailContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_RecursiveDetailContext::RU_RecursiveDetailContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_RecursiveDetailContext::STAR() { +tree::TerminalNode* CypherParser::RU_RecursiveDetailContext::STAR() { return getToken(CypherParser::STAR, 0); } -CypherParser::KU_RecursiveTypeContext* CypherParser::KU_RecursiveDetailContext::kU_RecursiveType() { - return getRuleContext(0); +CypherParser::RU_RecursiveTypeContext* CypherParser::RU_RecursiveDetailContext::rU_RecursiveType() { + return getRuleContext(0); } -CypherParser::OC_RangeLiteralContext* CypherParser::KU_RecursiveDetailContext::oC_RangeLiteral() { +CypherParser::OC_RangeLiteralContext* CypherParser::RU_RecursiveDetailContext::oC_RangeLiteral() { return getRuleContext(0); } -CypherParser::KU_RecursiveComprehensionContext* CypherParser::KU_RecursiveDetailContext::kU_RecursiveComprehension() { - return getRuleContext(0); +CypherParser::RU_RecursiveComprehensionContext* CypherParser::RU_RecursiveDetailContext::rU_RecursiveComprehension() { + return getRuleContext(0); } -std::vector CypherParser::KU_RecursiveDetailContext::SP() { +std::vector CypherParser::RU_RecursiveDetailContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_RecursiveDetailContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_RecursiveDetailContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_RecursiveDetailContext::getRuleIndex() const { - return CypherParser::RuleKU_RecursiveDetail; +size_t CypherParser::RU_RecursiveDetailContext::getRuleIndex() const { + return CypherParser::RuleRU_RecursiveDetail; } -CypherParser::KU_RecursiveDetailContext* CypherParser::kU_RecursiveDetail() { - KU_RecursiveDetailContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 226, CypherParser::RuleKU_RecursiveDetail); +CypherParser::RU_RecursiveDetailContext* CypherParser::rU_RecursiveDetail() { + RU_RecursiveDetailContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 226, CypherParser::RuleRU_RecursiveDetail); size_t _la = 0; #if __cplusplus > 201703L @@ -12958,7 +12958,7 @@ CypherParser::KU_RecursiveDetailContext* CypherParser::kU_RecursiveDetail() { match(CypherParser::SP); } setState(2064); - kU_RecursiveType(); + rU_RecursiveType(); break; } @@ -13005,7 +13005,7 @@ CypherParser::KU_RecursiveDetailContext* CypherParser::kU_RecursiveDetail() { match(CypherParser::SP); } setState(2076); - kU_RecursiveComprehension(); + rU_RecursiveComprehension(); break; } @@ -13023,53 +13023,53 @@ CypherParser::KU_RecursiveDetailContext* CypherParser::kU_RecursiveDetail() { return _localctx; } -//----------------- KU_RecursiveTypeContext ------------------------------------------------------------------ +//----------------- RU_RecursiveTypeContext ------------------------------------------------------------------ -CypherParser::KU_RecursiveTypeContext::KU_RecursiveTypeContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_RecursiveTypeContext::RU_RecursiveTypeContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_RecursiveTypeContext::WSHORTEST() { +tree::TerminalNode* CypherParser::RU_RecursiveTypeContext::WSHORTEST() { return getToken(CypherParser::WSHORTEST, 0); } -CypherParser::OC_PropertyKeyNameContext* CypherParser::KU_RecursiveTypeContext::oC_PropertyKeyName() { +CypherParser::OC_PropertyKeyNameContext* CypherParser::RU_RecursiveTypeContext::oC_PropertyKeyName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_RecursiveTypeContext::ALL() { +tree::TerminalNode* CypherParser::RU_RecursiveTypeContext::ALL() { return getToken(CypherParser::ALL, 0); } -std::vector CypherParser::KU_RecursiveTypeContext::SP() { +std::vector CypherParser::RU_RecursiveTypeContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_RecursiveTypeContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_RecursiveTypeContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -tree::TerminalNode* CypherParser::KU_RecursiveTypeContext::SHORTEST() { +tree::TerminalNode* CypherParser::RU_RecursiveTypeContext::SHORTEST() { return getToken(CypherParser::SHORTEST, 0); } -tree::TerminalNode* CypherParser::KU_RecursiveTypeContext::TRAIL() { +tree::TerminalNode* CypherParser::RU_RecursiveTypeContext::TRAIL() { return getToken(CypherParser::TRAIL, 0); } -tree::TerminalNode* CypherParser::KU_RecursiveTypeContext::ACYCLIC() { +tree::TerminalNode* CypherParser::RU_RecursiveTypeContext::ACYCLIC() { return getToken(CypherParser::ACYCLIC, 0); } -size_t CypherParser::KU_RecursiveTypeContext::getRuleIndex() const { - return CypherParser::RuleKU_RecursiveType; +size_t CypherParser::RU_RecursiveTypeContext::getRuleIndex() const { + return CypherParser::RuleRU_RecursiveType; } -CypherParser::KU_RecursiveTypeContext* CypherParser::kU_RecursiveType() { - KU_RecursiveTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 228, CypherParser::RuleKU_RecursiveType); +CypherParser::RU_RecursiveTypeContext* CypherParser::rU_RecursiveType() { + RU_RecursiveTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 228, CypherParser::RuleRU_RecursiveType); size_t _la = 0; #if __cplusplus > 201703L @@ -13293,49 +13293,49 @@ CypherParser::OC_RangeLiteralContext* CypherParser::oC_RangeLiteral() { return _localctx; } -//----------------- KU_RecursiveComprehensionContext ------------------------------------------------------------------ +//----------------- RU_RecursiveComprehensionContext ------------------------------------------------------------------ -CypherParser::KU_RecursiveComprehensionContext::KU_RecursiveComprehensionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_RecursiveComprehensionContext::RU_RecursiveComprehensionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_RecursiveComprehensionContext::oC_Variable() { +std::vector CypherParser::RU_RecursiveComprehensionContext::oC_Variable() { return getRuleContexts(); } -CypherParser::OC_VariableContext* CypherParser::KU_RecursiveComprehensionContext::oC_Variable(size_t i) { +CypherParser::OC_VariableContext* CypherParser::RU_RecursiveComprehensionContext::oC_Variable(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_RecursiveComprehensionContext::SP() { +std::vector CypherParser::RU_RecursiveComprehensionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_RecursiveComprehensionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_RecursiveComprehensionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_WhereContext* CypherParser::KU_RecursiveComprehensionContext::oC_Where() { +CypherParser::OC_WhereContext* CypherParser::RU_RecursiveComprehensionContext::oC_Where() { return getRuleContext(0); } -std::vector CypherParser::KU_RecursiveComprehensionContext::kU_RecursiveProjectionItems() { - return getRuleContexts(); +std::vector CypherParser::RU_RecursiveComprehensionContext::rU_RecursiveProjectionItems() { + return getRuleContexts(); } -CypherParser::KU_RecursiveProjectionItemsContext* CypherParser::KU_RecursiveComprehensionContext::kU_RecursiveProjectionItems(size_t i) { - return getRuleContext(i); +CypherParser::RU_RecursiveProjectionItemsContext* CypherParser::RU_RecursiveComprehensionContext::rU_RecursiveProjectionItems(size_t i) { + return getRuleContext(i); } -size_t CypherParser::KU_RecursiveComprehensionContext::getRuleIndex() const { - return CypherParser::RuleKU_RecursiveComprehension; +size_t CypherParser::RU_RecursiveComprehensionContext::getRuleIndex() const { + return CypherParser::RuleRU_RecursiveComprehension; } -CypherParser::KU_RecursiveComprehensionContext* CypherParser::kU_RecursiveComprehension() { - KU_RecursiveComprehensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 232, CypherParser::RuleKU_RecursiveComprehension); +CypherParser::RU_RecursiveComprehensionContext* CypherParser::rU_RecursiveComprehension() { + RU_RecursiveComprehensionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 232, CypherParser::RuleRU_RecursiveComprehension); size_t _la = 0; #if __cplusplus > 201703L @@ -13447,7 +13447,7 @@ CypherParser::KU_RecursiveComprehensionContext* CypherParser::kU_RecursiveCompre match(CypherParser::SP); } setState(2154); - kU_RecursiveProjectionItems(); + rU_RecursiveProjectionItems(); setState(2156); _errHandler->sync(this); @@ -13467,7 +13467,7 @@ CypherParser::KU_RecursiveComprehensionContext* CypherParser::kU_RecursiveCompre match(CypherParser::SP); } setState(2162); - kU_RecursiveProjectionItems(); + rU_RecursiveProjectionItems(); setState(2164); _errHandler->sync(this); @@ -13490,33 +13490,33 @@ CypherParser::KU_RecursiveComprehensionContext* CypherParser::kU_RecursiveCompre return _localctx; } -//----------------- KU_RecursiveProjectionItemsContext ------------------------------------------------------------------ +//----------------- RU_RecursiveProjectionItemsContext ------------------------------------------------------------------ -CypherParser::KU_RecursiveProjectionItemsContext::KU_RecursiveProjectionItemsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_RecursiveProjectionItemsContext::RU_RecursiveProjectionItemsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_RecursiveProjectionItemsContext::SP() { +std::vector CypherParser::RU_RecursiveProjectionItemsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_RecursiveProjectionItemsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_RecursiveProjectionItemsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::OC_ProjectionItemsContext* CypherParser::KU_RecursiveProjectionItemsContext::oC_ProjectionItems() { +CypherParser::OC_ProjectionItemsContext* CypherParser::RU_RecursiveProjectionItemsContext::oC_ProjectionItems() { return getRuleContext(0); } -size_t CypherParser::KU_RecursiveProjectionItemsContext::getRuleIndex() const { - return CypherParser::RuleKU_RecursiveProjectionItems; +size_t CypherParser::RU_RecursiveProjectionItemsContext::getRuleIndex() const { + return CypherParser::RuleRU_RecursiveProjectionItems; } -CypherParser::KU_RecursiveProjectionItemsContext* CypherParser::kU_RecursiveProjectionItems() { - KU_RecursiveProjectionItemsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 234, CypherParser::RuleKU_RecursiveProjectionItems); +CypherParser::RU_RecursiveProjectionItemsContext* CypherParser::rU_RecursiveProjectionItems() { + RU_RecursiveProjectionItemsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 234, CypherParser::RuleRU_RecursiveProjectionItems); size_t _la = 0; #if __cplusplus > 201703L @@ -14111,20 +14111,20 @@ CypherParser::OC_ComparisonExpressionContext::OC_ComparisonExpressionContext(Par : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::OC_ComparisonExpressionContext::kU_BitwiseOrOperatorExpression() { - return getRuleContexts(); +std::vector CypherParser::OC_ComparisonExpressionContext::rU_BitwiseOrOperatorExpression() { + return getRuleContexts(); } -CypherParser::KU_BitwiseOrOperatorExpressionContext* CypherParser::OC_ComparisonExpressionContext::kU_BitwiseOrOperatorExpression(size_t i) { - return getRuleContext(i); +CypherParser::RU_BitwiseOrOperatorExpressionContext* CypherParser::OC_ComparisonExpressionContext::rU_BitwiseOrOperatorExpression(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::OC_ComparisonExpressionContext::kU_ComparisonOperator() { - return getRuleContexts(); +std::vector CypherParser::OC_ComparisonExpressionContext::rU_ComparisonOperator() { + return getRuleContexts(); } -CypherParser::KU_ComparisonOperatorContext* CypherParser::OC_ComparisonExpressionContext::kU_ComparisonOperator(size_t i) { - return getRuleContext(i); +CypherParser::RU_ComparisonOperatorContext* CypherParser::OC_ComparisonExpressionContext::rU_ComparisonOperator(size_t i) { + return getRuleContext(i); } std::vector CypherParser::OC_ComparisonExpressionContext::SP() { @@ -14165,7 +14165,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress case 1: { enterOuterAlt(_localctx, 1); setState(2233); - kU_BitwiseOrOperatorExpression(); + rU_BitwiseOrOperatorExpression(); setState(2243); _errHandler->sync(this); @@ -14180,7 +14180,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress match(CypherParser::SP); } setState(2237); - kU_ComparisonOperator(); + rU_ComparisonOperator(); setState(2239); _errHandler->sync(this); @@ -14190,7 +14190,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress match(CypherParser::SP); } setState(2241); - kU_BitwiseOrOperatorExpression(); + rU_BitwiseOrOperatorExpression(); break; } @@ -14203,7 +14203,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress case 2: { enterOuterAlt(_localctx, 2); setState(2245); - kU_BitwiseOrOperatorExpression(); + rU_BitwiseOrOperatorExpression(); setState(2247); _errHandler->sync(this); @@ -14224,7 +14224,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress match(CypherParser::SP); } setState(2253); - kU_BitwiseOrOperatorExpression(); + rU_BitwiseOrOperatorExpression(); notifyInvalidNotEqualOperator(antlrcpp::downCast(_localctx)->invalid_not_equalToken); break; } @@ -14232,7 +14232,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress case 3: { enterOuterAlt(_localctx, 3); setState(2257); - kU_BitwiseOrOperatorExpression(); + rU_BitwiseOrOperatorExpression(); setState(2259); _errHandler->sync(this); @@ -14242,7 +14242,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress match(CypherParser::SP); } setState(2261); - kU_ComparisonOperator(); + rU_ComparisonOperator(); setState(2263); _errHandler->sync(this); @@ -14252,7 +14252,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress match(CypherParser::SP); } setState(2265); - kU_BitwiseOrOperatorExpression(); + rU_BitwiseOrOperatorExpression(); setState(2275); _errHandler->sync(this); alt = 1; @@ -14268,7 +14268,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress match(CypherParser::SP); } setState(2269); - kU_ComparisonOperator(); + rU_ComparisonOperator(); setState(2271); _errHandler->sync(this); @@ -14278,7 +14278,7 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress match(CypherParser::SP); } setState(2273); - kU_BitwiseOrOperatorExpression(); + rU_BitwiseOrOperatorExpression(); break; } @@ -14307,21 +14307,21 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress return _localctx; } -//----------------- KU_ComparisonOperatorContext ------------------------------------------------------------------ +//----------------- RU_ComparisonOperatorContext ------------------------------------------------------------------ -CypherParser::KU_ComparisonOperatorContext::KU_ComparisonOperatorContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ComparisonOperatorContext::RU_ComparisonOperatorContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -size_t CypherParser::KU_ComparisonOperatorContext::getRuleIndex() const { - return CypherParser::RuleKU_ComparisonOperator; +size_t CypherParser::RU_ComparisonOperatorContext::getRuleIndex() const { + return CypherParser::RuleRU_ComparisonOperator; } -CypherParser::KU_ComparisonOperatorContext* CypherParser::kU_ComparisonOperator() { - KU_ComparisonOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 256, CypherParser::RuleKU_ComparisonOperator); +CypherParser::RU_ComparisonOperatorContext* CypherParser::rU_ComparisonOperator() { + RU_ComparisonOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 256, CypherParser::RuleRU_ComparisonOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -14354,37 +14354,37 @@ CypherParser::KU_ComparisonOperatorContext* CypherParser::kU_ComparisonOperator( return _localctx; } -//----------------- KU_BitwiseOrOperatorExpressionContext ------------------------------------------------------------------ +//----------------- RU_BitwiseOrOperatorExpressionContext ------------------------------------------------------------------ -CypherParser::KU_BitwiseOrOperatorExpressionContext::KU_BitwiseOrOperatorExpressionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_BitwiseOrOperatorExpressionContext::RU_BitwiseOrOperatorExpressionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_BitwiseOrOperatorExpressionContext::kU_BitwiseAndOperatorExpression() { - return getRuleContexts(); +std::vector CypherParser::RU_BitwiseOrOperatorExpressionContext::rU_BitwiseAndOperatorExpression() { + return getRuleContexts(); } -CypherParser::KU_BitwiseAndOperatorExpressionContext* CypherParser::KU_BitwiseOrOperatorExpressionContext::kU_BitwiseAndOperatorExpression(size_t i) { - return getRuleContext(i); +CypherParser::RU_BitwiseAndOperatorExpressionContext* CypherParser::RU_BitwiseOrOperatorExpressionContext::rU_BitwiseAndOperatorExpression(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_BitwiseOrOperatorExpressionContext::SP() { +std::vector CypherParser::RU_BitwiseOrOperatorExpressionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_BitwiseOrOperatorExpressionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_BitwiseOrOperatorExpressionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_BitwiseOrOperatorExpressionContext::getRuleIndex() const { - return CypherParser::RuleKU_BitwiseOrOperatorExpression; +size_t CypherParser::RU_BitwiseOrOperatorExpressionContext::getRuleIndex() const { + return CypherParser::RuleRU_BitwiseOrOperatorExpression; } -CypherParser::KU_BitwiseOrOperatorExpressionContext* CypherParser::kU_BitwiseOrOperatorExpression() { - KU_BitwiseOrOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 258, CypherParser::RuleKU_BitwiseOrOperatorExpression); +CypherParser::RU_BitwiseOrOperatorExpressionContext* CypherParser::rU_BitwiseOrOperatorExpression() { + RU_BitwiseOrOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 258, CypherParser::RuleRU_BitwiseOrOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -14398,7 +14398,7 @@ CypherParser::KU_BitwiseOrOperatorExpressionContext* CypherParser::kU_BitwiseOrO size_t alt; enterOuterAlt(_localctx, 1); setState(2285); - kU_BitwiseAndOperatorExpression(); + rU_BitwiseAndOperatorExpression(); setState(2296); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 369, _ctx); @@ -14423,7 +14423,7 @@ CypherParser::KU_BitwiseOrOperatorExpressionContext* CypherParser::kU_BitwiseOrO match(CypherParser::SP); } setState(2293); - kU_BitwiseAndOperatorExpression(); + rU_BitwiseAndOperatorExpression(); } setState(2298); _errHandler->sync(this); @@ -14440,37 +14440,37 @@ CypherParser::KU_BitwiseOrOperatorExpressionContext* CypherParser::kU_BitwiseOrO return _localctx; } -//----------------- KU_BitwiseAndOperatorExpressionContext ------------------------------------------------------------------ +//----------------- RU_BitwiseAndOperatorExpressionContext ------------------------------------------------------------------ -CypherParser::KU_BitwiseAndOperatorExpressionContext::KU_BitwiseAndOperatorExpressionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_BitwiseAndOperatorExpressionContext::RU_BitwiseAndOperatorExpressionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_BitwiseAndOperatorExpressionContext::kU_BitShiftOperatorExpression() { - return getRuleContexts(); +std::vector CypherParser::RU_BitwiseAndOperatorExpressionContext::rU_BitShiftOperatorExpression() { + return getRuleContexts(); } -CypherParser::KU_BitShiftOperatorExpressionContext* CypherParser::KU_BitwiseAndOperatorExpressionContext::kU_BitShiftOperatorExpression(size_t i) { - return getRuleContext(i); +CypherParser::RU_BitShiftOperatorExpressionContext* CypherParser::RU_BitwiseAndOperatorExpressionContext::rU_BitShiftOperatorExpression(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_BitwiseAndOperatorExpressionContext::SP() { +std::vector CypherParser::RU_BitwiseAndOperatorExpressionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_BitwiseAndOperatorExpressionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_BitwiseAndOperatorExpressionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_BitwiseAndOperatorExpressionContext::getRuleIndex() const { - return CypherParser::RuleKU_BitwiseAndOperatorExpression; +size_t CypherParser::RU_BitwiseAndOperatorExpressionContext::getRuleIndex() const { + return CypherParser::RuleRU_BitwiseAndOperatorExpression; } -CypherParser::KU_BitwiseAndOperatorExpressionContext* CypherParser::kU_BitwiseAndOperatorExpression() { - KU_BitwiseAndOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 260, CypherParser::RuleKU_BitwiseAndOperatorExpression); +CypherParser::RU_BitwiseAndOperatorExpressionContext* CypherParser::rU_BitwiseAndOperatorExpression() { + RU_BitwiseAndOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 260, CypherParser::RuleRU_BitwiseAndOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -14484,7 +14484,7 @@ CypherParser::KU_BitwiseAndOperatorExpressionContext* CypherParser::kU_BitwiseAn size_t alt; enterOuterAlt(_localctx, 1); setState(2299); - kU_BitShiftOperatorExpression(); + rU_BitShiftOperatorExpression(); setState(2310); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 372, _ctx); @@ -14509,7 +14509,7 @@ CypherParser::KU_BitwiseAndOperatorExpressionContext* CypherParser::kU_BitwiseAn match(CypherParser::SP); } setState(2307); - kU_BitShiftOperatorExpression(); + rU_BitShiftOperatorExpression(); } setState(2312); _errHandler->sync(this); @@ -14526,45 +14526,45 @@ CypherParser::KU_BitwiseAndOperatorExpressionContext* CypherParser::kU_BitwiseAn return _localctx; } -//----------------- KU_BitShiftOperatorExpressionContext ------------------------------------------------------------------ +//----------------- RU_BitShiftOperatorExpressionContext ------------------------------------------------------------------ -CypherParser::KU_BitShiftOperatorExpressionContext::KU_BitShiftOperatorExpressionContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_BitShiftOperatorExpressionContext::RU_BitShiftOperatorExpressionContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_BitShiftOperatorExpressionContext::oC_AddOrSubtractExpression() { +std::vector CypherParser::RU_BitShiftOperatorExpressionContext::oC_AddOrSubtractExpression() { return getRuleContexts(); } -CypherParser::OC_AddOrSubtractExpressionContext* CypherParser::KU_BitShiftOperatorExpressionContext::oC_AddOrSubtractExpression(size_t i) { +CypherParser::OC_AddOrSubtractExpressionContext* CypherParser::RU_BitShiftOperatorExpressionContext::oC_AddOrSubtractExpression(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_BitShiftOperatorExpressionContext::kU_BitShiftOperator() { - return getRuleContexts(); +std::vector CypherParser::RU_BitShiftOperatorExpressionContext::rU_BitShiftOperator() { + return getRuleContexts(); } -CypherParser::KU_BitShiftOperatorContext* CypherParser::KU_BitShiftOperatorExpressionContext::kU_BitShiftOperator(size_t i) { - return getRuleContext(i); +CypherParser::RU_BitShiftOperatorContext* CypherParser::RU_BitShiftOperatorExpressionContext::rU_BitShiftOperator(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_BitShiftOperatorExpressionContext::SP() { +std::vector CypherParser::RU_BitShiftOperatorExpressionContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_BitShiftOperatorExpressionContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_BitShiftOperatorExpressionContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_BitShiftOperatorExpressionContext::getRuleIndex() const { - return CypherParser::RuleKU_BitShiftOperatorExpression; +size_t CypherParser::RU_BitShiftOperatorExpressionContext::getRuleIndex() const { + return CypherParser::RuleRU_BitShiftOperatorExpression; } -CypherParser::KU_BitShiftOperatorExpressionContext* CypherParser::kU_BitShiftOperatorExpression() { - KU_BitShiftOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 262, CypherParser::RuleKU_BitShiftOperatorExpression); +CypherParser::RU_BitShiftOperatorExpressionContext* CypherParser::rU_BitShiftOperatorExpression() { + RU_BitShiftOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 262, CypherParser::RuleRU_BitShiftOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -14593,7 +14593,7 @@ CypherParser::KU_BitShiftOperatorExpressionContext* CypherParser::kU_BitShiftOpe match(CypherParser::SP); } setState(2317); - kU_BitShiftOperator(); + rU_BitShiftOperator(); setState(2319); _errHandler->sync(this); @@ -14620,21 +14620,21 @@ CypherParser::KU_BitShiftOperatorExpressionContext* CypherParser::kU_BitShiftOpe return _localctx; } -//----------------- KU_BitShiftOperatorContext ------------------------------------------------------------------ +//----------------- RU_BitShiftOperatorContext ------------------------------------------------------------------ -CypherParser::KU_BitShiftOperatorContext::KU_BitShiftOperatorContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_BitShiftOperatorContext::RU_BitShiftOperatorContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -size_t CypherParser::KU_BitShiftOperatorContext::getRuleIndex() const { - return CypherParser::RuleKU_BitShiftOperator; +size_t CypherParser::RU_BitShiftOperatorContext::getRuleIndex() const { + return CypherParser::RuleRU_BitShiftOperator; } -CypherParser::KU_BitShiftOperatorContext* CypherParser::kU_BitShiftOperator() { - KU_BitShiftOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 264, CypherParser::RuleKU_BitShiftOperator); +CypherParser::RU_BitShiftOperatorContext* CypherParser::rU_BitShiftOperator() { + RU_BitShiftOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 264, CypherParser::RuleRU_BitShiftOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -14682,12 +14682,12 @@ CypherParser::OC_MultiplyDivideModuloExpressionContext* CypherParser::OC_AddOrSu return getRuleContext(i); } -std::vector CypherParser::OC_AddOrSubtractExpressionContext::kU_AddOrSubtractOperator() { - return getRuleContexts(); +std::vector CypherParser::OC_AddOrSubtractExpressionContext::rU_AddOrSubtractOperator() { + return getRuleContexts(); } -CypherParser::KU_AddOrSubtractOperatorContext* CypherParser::OC_AddOrSubtractExpressionContext::kU_AddOrSubtractOperator(size_t i) { - return getRuleContext(i); +CypherParser::RU_AddOrSubtractOperatorContext* CypherParser::OC_AddOrSubtractExpressionContext::rU_AddOrSubtractOperator(size_t i) { + return getRuleContext(i); } std::vector CypherParser::OC_AddOrSubtractExpressionContext::SP() { @@ -14735,7 +14735,7 @@ CypherParser::OC_AddOrSubtractExpressionContext* CypherParser::oC_AddOrSubtractE match(CypherParser::SP); } setState(2334); - kU_AddOrSubtractOperator(); + rU_AddOrSubtractOperator(); setState(2336); _errHandler->sync(this); @@ -14762,25 +14762,25 @@ CypherParser::OC_AddOrSubtractExpressionContext* CypherParser::oC_AddOrSubtractE return _localctx; } -//----------------- KU_AddOrSubtractOperatorContext ------------------------------------------------------------------ +//----------------- RU_AddOrSubtractOperatorContext ------------------------------------------------------------------ -CypherParser::KU_AddOrSubtractOperatorContext::KU_AddOrSubtractOperatorContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_AddOrSubtractOperatorContext::RU_AddOrSubtractOperatorContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_AddOrSubtractOperatorContext::MINUS() { +tree::TerminalNode* CypherParser::RU_AddOrSubtractOperatorContext::MINUS() { return getToken(CypherParser::MINUS, 0); } -size_t CypherParser::KU_AddOrSubtractOperatorContext::getRuleIndex() const { - return CypherParser::RuleKU_AddOrSubtractOperator; +size_t CypherParser::RU_AddOrSubtractOperatorContext::getRuleIndex() const { + return CypherParser::RuleRU_AddOrSubtractOperator; } -CypherParser::KU_AddOrSubtractOperatorContext* CypherParser::kU_AddOrSubtractOperator() { - KU_AddOrSubtractOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 268, CypherParser::RuleKU_AddOrSubtractOperator); +CypherParser::RU_AddOrSubtractOperatorContext* CypherParser::rU_AddOrSubtractOperator() { + RU_AddOrSubtractOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 268, CypherParser::RuleRU_AddOrSubtractOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -14826,12 +14826,12 @@ CypherParser::OC_PowerOfExpressionContext* CypherParser::OC_MultiplyDivideModulo return getRuleContext(i); } -std::vector CypherParser::OC_MultiplyDivideModuloExpressionContext::kU_MultiplyDivideModuloOperator() { - return getRuleContexts(); +std::vector CypherParser::OC_MultiplyDivideModuloExpressionContext::rU_MultiplyDivideModuloOperator() { + return getRuleContexts(); } -CypherParser::KU_MultiplyDivideModuloOperatorContext* CypherParser::OC_MultiplyDivideModuloExpressionContext::kU_MultiplyDivideModuloOperator(size_t i) { - return getRuleContext(i); +CypherParser::RU_MultiplyDivideModuloOperatorContext* CypherParser::OC_MultiplyDivideModuloExpressionContext::rU_MultiplyDivideModuloOperator(size_t i) { + return getRuleContext(i); } std::vector CypherParser::OC_MultiplyDivideModuloExpressionContext::SP() { @@ -14879,7 +14879,7 @@ CypherParser::OC_MultiplyDivideModuloExpressionContext* CypherParser::oC_Multipl match(CypherParser::SP); } setState(2351); - kU_MultiplyDivideModuloOperator(); + rU_MultiplyDivideModuloOperator(); setState(2353); _errHandler->sync(this); @@ -14906,25 +14906,25 @@ CypherParser::OC_MultiplyDivideModuloExpressionContext* CypherParser::oC_Multipl return _localctx; } -//----------------- KU_MultiplyDivideModuloOperatorContext ------------------------------------------------------------------ +//----------------- RU_MultiplyDivideModuloOperatorContext ------------------------------------------------------------------ -CypherParser::KU_MultiplyDivideModuloOperatorContext::KU_MultiplyDivideModuloOperatorContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_MultiplyDivideModuloOperatorContext::RU_MultiplyDivideModuloOperatorContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_MultiplyDivideModuloOperatorContext::STAR() { +tree::TerminalNode* CypherParser::RU_MultiplyDivideModuloOperatorContext::STAR() { return getToken(CypherParser::STAR, 0); } -size_t CypherParser::KU_MultiplyDivideModuloOperatorContext::getRuleIndex() const { - return CypherParser::RuleKU_MultiplyDivideModuloOperator; +size_t CypherParser::RU_MultiplyDivideModuloOperatorContext::getRuleIndex() const { + return CypherParser::RuleRU_MultiplyDivideModuloOperator; } -CypherParser::KU_MultiplyDivideModuloOperatorContext* CypherParser::kU_MultiplyDivideModuloOperator() { - KU_MultiplyDivideModuloOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 272, CypherParser::RuleKU_MultiplyDivideModuloOperator); +CypherParser::RU_MultiplyDivideModuloOperatorContext* CypherParser::rU_MultiplyDivideModuloOperator() { + RU_MultiplyDivideModuloOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 272, CypherParser::RuleRU_MultiplyDivideModuloOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -16241,8 +16241,8 @@ CypherParser::OC_ListLiteralContext* CypherParser::OC_LiteralContext::oC_ListLit return getRuleContext(0); } -CypherParser::KU_StructLiteralContext* CypherParser::OC_LiteralContext::kU_StructLiteral() { - return getRuleContext(0); +CypherParser::RU_StructLiteralContext* CypherParser::OC_LiteralContext::rU_StructLiteral() { + return getRuleContext(0); } @@ -16307,7 +16307,7 @@ CypherParser::OC_LiteralContext* CypherParser::oC_Literal() { case CypherParser::T__8: { enterOuterAlt(_localctx, 6); setState(2554); - kU_StructLiteral(); + rU_StructLiteral(); break; } @@ -16399,12 +16399,12 @@ CypherParser::OC_ExpressionContext* CypherParser::OC_ListLiteralContext::oC_Expr return getRuleContext(0); } -std::vector CypherParser::OC_ListLiteralContext::kU_ListEntry() { - return getRuleContexts(); +std::vector CypherParser::OC_ListLiteralContext::rU_ListEntry() { + return getRuleContexts(); } -CypherParser::KU_ListEntryContext* CypherParser::OC_ListLiteralContext::kU_ListEntry(size_t i) { - return getRuleContext(i); +CypherParser::RU_ListEntryContext* CypherParser::OC_ListLiteralContext::rU_ListEntry(size_t i) { + return getRuleContext(i); } @@ -16460,7 +16460,7 @@ CypherParser::OC_ListLiteralContext* CypherParser::oC_ListLiteral() { _la = _input->LA(1); while (_la == CypherParser::T__3) { setState(2567); - kU_ListEntry(); + rU_ListEntry(); setState(2569); _errHandler->sync(this); @@ -16487,29 +16487,29 @@ CypherParser::OC_ListLiteralContext* CypherParser::oC_ListLiteral() { return _localctx; } -//----------------- KU_ListEntryContext ------------------------------------------------------------------ +//----------------- RU_ListEntryContext ------------------------------------------------------------------ -CypherParser::KU_ListEntryContext::KU_ListEntryContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_ListEntryContext::RU_ListEntryContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_ListEntryContext::SP() { +tree::TerminalNode* CypherParser::RU_ListEntryContext::SP() { return getToken(CypherParser::SP, 0); } -CypherParser::OC_ExpressionContext* CypherParser::KU_ListEntryContext::oC_Expression() { +CypherParser::OC_ExpressionContext* CypherParser::RU_ListEntryContext::oC_Expression() { return getRuleContext(0); } -size_t CypherParser::KU_ListEntryContext::getRuleIndex() const { - return CypherParser::RuleKU_ListEntry; +size_t CypherParser::RU_ListEntryContext::getRuleIndex() const { + return CypherParser::RuleRU_ListEntry; } -CypherParser::KU_ListEntryContext* CypherParser::kU_ListEntry() { - KU_ListEntryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 304, CypherParser::RuleKU_ListEntry); +CypherParser::RU_ListEntryContext* CypherParser::rU_ListEntry() { + RU_ListEntryContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 304, CypherParser::RuleRU_ListEntry); size_t _la = 0; #if __cplusplus > 201703L @@ -16558,37 +16558,37 @@ CypherParser::KU_ListEntryContext* CypherParser::kU_ListEntry() { return _localctx; } -//----------------- KU_StructLiteralContext ------------------------------------------------------------------ +//----------------- RU_StructLiteralContext ------------------------------------------------------------------ -CypherParser::KU_StructLiteralContext::KU_StructLiteralContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_StructLiteralContext::RU_StructLiteralContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_StructLiteralContext::kU_StructField() { - return getRuleContexts(); +std::vector CypherParser::RU_StructLiteralContext::rU_StructField() { + return getRuleContexts(); } -CypherParser::KU_StructFieldContext* CypherParser::KU_StructLiteralContext::kU_StructField(size_t i) { - return getRuleContext(i); +CypherParser::RU_StructFieldContext* CypherParser::RU_StructLiteralContext::rU_StructField(size_t i) { + return getRuleContext(i); } -std::vector CypherParser::KU_StructLiteralContext::SP() { +std::vector CypherParser::RU_StructLiteralContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_StructLiteralContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_StructLiteralContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_StructLiteralContext::getRuleIndex() const { - return CypherParser::RuleKU_StructLiteral; +size_t CypherParser::RU_StructLiteralContext::getRuleIndex() const { + return CypherParser::RuleRU_StructLiteral; } -CypherParser::KU_StructLiteralContext* CypherParser::kU_StructLiteral() { - KU_StructLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 306, CypherParser::RuleKU_StructLiteral); +CypherParser::RU_StructLiteralContext* CypherParser::rU_StructLiteral() { + RU_StructLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 306, CypherParser::RuleRU_StructLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -16611,7 +16611,7 @@ CypherParser::KU_StructLiteralContext* CypherParser::kU_StructLiteral() { match(CypherParser::SP); } setState(2591); - kU_StructField(); + rU_StructField(); setState(2593); _errHandler->sync(this); @@ -16635,7 +16635,7 @@ CypherParser::KU_StructLiteralContext* CypherParser::kU_StructLiteral() { match(CypherParser::SP); } setState(2599); - kU_StructField(); + rU_StructField(); setState(2601); _errHandler->sync(this); @@ -16661,45 +16661,45 @@ CypherParser::KU_StructLiteralContext* CypherParser::kU_StructLiteral() { return _localctx; } -//----------------- KU_StructFieldContext ------------------------------------------------------------------ +//----------------- RU_StructFieldContext ------------------------------------------------------------------ -CypherParser::KU_StructFieldContext::KU_StructFieldContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_StructFieldContext::RU_StructFieldContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_StructFieldContext::COLON() { +tree::TerminalNode* CypherParser::RU_StructFieldContext::COLON() { return getToken(CypherParser::COLON, 0); } -CypherParser::OC_ExpressionContext* CypherParser::KU_StructFieldContext::oC_Expression() { +CypherParser::OC_ExpressionContext* CypherParser::RU_StructFieldContext::oC_Expression() { return getRuleContext(0); } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_StructFieldContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_StructFieldContext::oC_SymbolicName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_StructFieldContext::StringLiteral() { +tree::TerminalNode* CypherParser::RU_StructFieldContext::StringLiteral() { return getToken(CypherParser::StringLiteral, 0); } -std::vector CypherParser::KU_StructFieldContext::SP() { +std::vector CypherParser::RU_StructFieldContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_StructFieldContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_StructFieldContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_StructFieldContext::getRuleIndex() const { - return CypherParser::RuleKU_StructField; +size_t CypherParser::RU_StructFieldContext::getRuleIndex() const { + return CypherParser::RuleRU_StructField; } -CypherParser::KU_StructFieldContext* CypherParser::kU_StructField() { - KU_StructFieldContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 308, CypherParser::RuleKU_StructField); +CypherParser::RU_StructFieldContext* CypherParser::rU_StructField() { + RU_StructFieldContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 308, CypherParser::RuleRU_StructField); size_t _la = 0; #if __cplusplus > 201703L @@ -16921,20 +16921,20 @@ tree::TerminalNode* CypherParser::OC_FunctionInvocationContext::CAST() { return getToken(CypherParser::CAST, 0); } -std::vector CypherParser::OC_FunctionInvocationContext::kU_FunctionParameter() { - return getRuleContexts(); +std::vector CypherParser::OC_FunctionInvocationContext::rU_FunctionParameter() { + return getRuleContexts(); } -CypherParser::KU_FunctionParameterContext* CypherParser::OC_FunctionInvocationContext::kU_FunctionParameter(size_t i) { - return getRuleContext(i); +CypherParser::RU_FunctionParameterContext* CypherParser::OC_FunctionInvocationContext::rU_FunctionParameter(size_t i) { + return getRuleContext(i); } tree::TerminalNode* CypherParser::OC_FunctionInvocationContext::AS() { return getToken(CypherParser::AS, 0); } -CypherParser::KU_DataTypeContext* CypherParser::OC_FunctionInvocationContext::kU_DataType() { - return getRuleContext(0); +CypherParser::RU_DataTypeContext* CypherParser::OC_FunctionInvocationContext::rU_DataType() { + return getRuleContext(0); } CypherParser::OC_FunctionNameContext* CypherParser::OC_FunctionInvocationContext::oC_FunctionName() { @@ -17027,7 +17027,7 @@ CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation( match(CypherParser::SP); } setState(2654); - kU_FunctionParameter(); + rU_FunctionParameter(); setState(2656); _errHandler->sync(this); @@ -17051,7 +17051,7 @@ CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation( match(CypherParser::SP); } setState(2662); - kU_DataType(0); + rU_DataType(0); break; } @@ -17067,7 +17067,7 @@ CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation( match(CypherParser::SP); } setState(2667); - kU_FunctionParameter(); + rU_FunctionParameter(); break; } @@ -17134,7 +17134,7 @@ CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation( ((1ULL << (_la - 65)) & -286014905805559497) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && ((1ULL << (_la - 130)) & 5492410606132523) != 0)) { setState(2689); - kU_FunctionParameter(); + rU_FunctionParameter(); setState(2691); _errHandler->sync(this); @@ -17158,7 +17158,7 @@ CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation( match(CypherParser::SP); } setState(2697); - kU_FunctionParameter(); + rU_FunctionParameter(); setState(2699); _errHandler->sync(this); @@ -17233,45 +17233,45 @@ CypherParser::OC_FunctionNameContext* CypherParser::oC_FunctionName() { return _localctx; } -//----------------- KU_FunctionParameterContext ------------------------------------------------------------------ +//----------------- RU_FunctionParameterContext ------------------------------------------------------------------ -CypherParser::KU_FunctionParameterContext::KU_FunctionParameterContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_FunctionParameterContext::RU_FunctionParameterContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::OC_ExpressionContext* CypherParser::KU_FunctionParameterContext::oC_Expression() { +CypherParser::OC_ExpressionContext* CypherParser::RU_FunctionParameterContext::oC_Expression() { return getRuleContext(0); } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_FunctionParameterContext::oC_SymbolicName() { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_FunctionParameterContext::oC_SymbolicName() { return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_FunctionParameterContext::COLON() { +tree::TerminalNode* CypherParser::RU_FunctionParameterContext::COLON() { return getToken(CypherParser::COLON, 0); } -std::vector CypherParser::KU_FunctionParameterContext::SP() { +std::vector CypherParser::RU_FunctionParameterContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_FunctionParameterContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_FunctionParameterContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -CypherParser::KU_LambdaParameterContext* CypherParser::KU_FunctionParameterContext::kU_LambdaParameter() { - return getRuleContext(0); +CypherParser::RU_LambdaParameterContext* CypherParser::RU_FunctionParameterContext::rU_LambdaParameter() { + return getRuleContext(0); } -size_t CypherParser::KU_FunctionParameterContext::getRuleIndex() const { - return CypherParser::RuleKU_FunctionParameter; +size_t CypherParser::RU_FunctionParameterContext::getRuleIndex() const { + return CypherParser::RuleRU_FunctionParameter; } -CypherParser::KU_FunctionParameterContext* CypherParser::kU_FunctionParameter() { - KU_FunctionParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 316, CypherParser::RuleKU_FunctionParameter); +CypherParser::RU_FunctionParameterContext* CypherParser::rU_FunctionParameter() { + RU_FunctionParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 316, CypherParser::RuleRU_FunctionParameter); size_t _la = 0; #if __cplusplus > 201703L @@ -17328,7 +17328,7 @@ CypherParser::KU_FunctionParameterContext* CypherParser::kU_FunctionParameter() case 2: { enterOuterAlt(_localctx, 2); setState(2726); - kU_LambdaParameter(); + rU_LambdaParameter(); break; } @@ -17346,41 +17346,41 @@ CypherParser::KU_FunctionParameterContext* CypherParser::kU_FunctionParameter() return _localctx; } -//----------------- KU_LambdaParameterContext ------------------------------------------------------------------ +//----------------- RU_LambdaParameterContext ------------------------------------------------------------------ -CypherParser::KU_LambdaParameterContext::KU_LambdaParameterContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_LambdaParameterContext::RU_LambdaParameterContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -CypherParser::KU_LambdaVarsContext* CypherParser::KU_LambdaParameterContext::kU_LambdaVars() { - return getRuleContext(0); +CypherParser::RU_LambdaVarsContext* CypherParser::RU_LambdaParameterContext::rU_LambdaVars() { + return getRuleContext(0); } -tree::TerminalNode* CypherParser::KU_LambdaParameterContext::MINUS() { +tree::TerminalNode* CypherParser::RU_LambdaParameterContext::MINUS() { return getToken(CypherParser::MINUS, 0); } -CypherParser::OC_ExpressionContext* CypherParser::KU_LambdaParameterContext::oC_Expression() { +CypherParser::OC_ExpressionContext* CypherParser::RU_LambdaParameterContext::oC_Expression() { return getRuleContext(0); } -std::vector CypherParser::KU_LambdaParameterContext::SP() { +std::vector CypherParser::RU_LambdaParameterContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_LambdaParameterContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_LambdaParameterContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_LambdaParameterContext::getRuleIndex() const { - return CypherParser::RuleKU_LambdaParameter; +size_t CypherParser::RU_LambdaParameterContext::getRuleIndex() const { + return CypherParser::RuleRU_LambdaParameter; } -CypherParser::KU_LambdaParameterContext* CypherParser::kU_LambdaParameter() { - KU_LambdaParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 318, CypherParser::RuleKU_LambdaParameter); +CypherParser::RU_LambdaParameterContext* CypherParser::rU_LambdaParameter() { + RU_LambdaParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 318, CypherParser::RuleRU_LambdaParameter); size_t _la = 0; #if __cplusplus > 201703L @@ -17393,7 +17393,7 @@ CypherParser::KU_LambdaParameterContext* CypherParser::kU_LambdaParameter() { try { enterOuterAlt(_localctx, 1); setState(2729); - kU_LambdaVars(); + rU_LambdaVars(); setState(2731); _errHandler->sync(this); @@ -17440,37 +17440,37 @@ CypherParser::KU_LambdaParameterContext* CypherParser::kU_LambdaParameter() { return _localctx; } -//----------------- KU_LambdaVarsContext ------------------------------------------------------------------ +//----------------- RU_LambdaVarsContext ------------------------------------------------------------------ -CypherParser::KU_LambdaVarsContext::KU_LambdaVarsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_LambdaVarsContext::RU_LambdaVarsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector CypherParser::KU_LambdaVarsContext::oC_SymbolicName() { +std::vector CypherParser::RU_LambdaVarsContext::oC_SymbolicName() { return getRuleContexts(); } -CypherParser::OC_SymbolicNameContext* CypherParser::KU_LambdaVarsContext::oC_SymbolicName(size_t i) { +CypherParser::OC_SymbolicNameContext* CypherParser::RU_LambdaVarsContext::oC_SymbolicName(size_t i) { return getRuleContext(i); } -std::vector CypherParser::KU_LambdaVarsContext::SP() { +std::vector CypherParser::RU_LambdaVarsContext::SP() { return getTokens(CypherParser::SP); } -tree::TerminalNode* CypherParser::KU_LambdaVarsContext::SP(size_t i) { +tree::TerminalNode* CypherParser::RU_LambdaVarsContext::SP(size_t i) { return getToken(CypherParser::SP, i); } -size_t CypherParser::KU_LambdaVarsContext::getRuleIndex() const { - return CypherParser::RuleKU_LambdaVars; +size_t CypherParser::RU_LambdaVarsContext::getRuleIndex() const { + return CypherParser::RuleRU_LambdaVars; } -CypherParser::KU_LambdaVarsContext* CypherParser::kU_LambdaVars() { - KU_LambdaVarsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 320, CypherParser::RuleKU_LambdaVars); +CypherParser::RU_LambdaVarsContext* CypherParser::rU_LambdaVars() { + RU_LambdaVarsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 320, CypherParser::RuleRU_LambdaVars); size_t _la = 0; #if __cplusplus > 201703L @@ -17744,8 +17744,8 @@ CypherParser::OC_WhereContext* CypherParser::OC_ExistCountSubqueryContext::oC_Wh return getRuleContext(0); } -CypherParser::KU_HintContext* CypherParser::OC_ExistCountSubqueryContext::kU_Hint() { - return getRuleContext(0); +CypherParser::RU_HintContext* CypherParser::OC_ExistCountSubqueryContext::rU_Hint() { + return getRuleContext(0); } @@ -17844,7 +17844,7 @@ CypherParser::OC_ExistCountSubqueryContext* CypherParser::oC_ExistCountSubquery( match(CypherParser::SP); } setState(2799); - kU_Hint(); + rU_Hint(); break; } @@ -18796,8 +18796,8 @@ tree::TerminalNode* CypherParser::OC_SymbolicNameContext::HexLetter() { return getToken(CypherParser::HexLetter, 0); } -CypherParser::KU_NonReservedKeywordsContext* CypherParser::OC_SymbolicNameContext::kU_NonReservedKeywords() { - return getRuleContext(0); +CypherParser::RU_NonReservedKeywordsContext* CypherParser::OC_SymbolicNameContext::rU_NonReservedKeywords() { + return getRuleContext(0); } @@ -18907,7 +18907,7 @@ CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { case CypherParser::L_SKIP: { enterOuterAlt(_localctx, 4); setState(2897); - kU_NonReservedKeywords(); + rU_NonReservedKeywords(); break; } @@ -18925,269 +18925,269 @@ CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { return _localctx; } -//----------------- KU_NonReservedKeywordsContext ------------------------------------------------------------------ +//----------------- RU_NonReservedKeywordsContext ------------------------------------------------------------------ -CypherParser::KU_NonReservedKeywordsContext::KU_NonReservedKeywordsContext(ParserRuleContext *parent, size_t invokingState) +CypherParser::RU_NonReservedKeywordsContext::RU_NonReservedKeywordsContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::COMMENT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::COMMENT() { return getToken(CypherParser::COMMENT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::ADD() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::ADD() { return getToken(CypherParser::ADD, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::ALTER() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::ALTER() { return getToken(CypherParser::ALTER, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::AS() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::AS() { return getToken(CypherParser::AS, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::ATTACH() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::ATTACH() { return getToken(CypherParser::ATTACH, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::BEGIN() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::BEGIN() { return getToken(CypherParser::BEGIN, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::BY() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::BY() { return getToken(CypherParser::BY, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::CALL() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::CALL() { return getToken(CypherParser::CALL, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::CHECKPOINT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::CHECKPOINT() { return getToken(CypherParser::CHECKPOINT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::COMMIT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::COMMIT() { return getToken(CypherParser::COMMIT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::CONTAINS() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::CONTAINS() { return getToken(CypherParser::CONTAINS, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::COPY() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::COPY() { return getToken(CypherParser::COPY, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::COUNT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::COUNT() { return getToken(CypherParser::COUNT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::CYCLE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::CYCLE() { return getToken(CypherParser::CYCLE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::DATABASE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::DATABASE() { return getToken(CypherParser::DATABASE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::DECIMAL() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::DECIMAL() { return getToken(CypherParser::DECIMAL, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::DELETE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::DELETE() { return getToken(CypherParser::DELETE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::DETACH() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::DETACH() { return getToken(CypherParser::DETACH, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::DROP() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::DROP() { return getToken(CypherParser::DROP, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::EXPLAIN() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::EXPLAIN() { return getToken(CypherParser::EXPLAIN, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::EXPORT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::EXPORT() { return getToken(CypherParser::EXPORT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::EXTENSION() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::EXTENSION() { return getToken(CypherParser::EXTENSION, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::FORCE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::FORCE() { return getToken(CypherParser::FORCE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::GRAPH() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::GRAPH() { return getToken(CypherParser::GRAPH, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::IF() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::IF() { return getToken(CypherParser::IF, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::IS() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::IS() { return getToken(CypherParser::IS, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::IMPORT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::IMPORT() { return getToken(CypherParser::IMPORT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::INCREMENT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::INCREMENT() { return getToken(CypherParser::INCREMENT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::KEY() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::KEY() { return getToken(CypherParser::KEY, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::LOAD() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::LOAD() { return getToken(CypherParser::LOAD, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::LOGICAL() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::LOGICAL() { return getToken(CypherParser::LOGICAL, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::MATCH() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::MATCH() { return getToken(CypherParser::MATCH, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::MAXVALUE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::MAXVALUE() { return getToken(CypherParser::MAXVALUE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::MERGE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::MERGE() { return getToken(CypherParser::MERGE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::MINVALUE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::MINVALUE() { return getToken(CypherParser::MINVALUE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::NO() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::NO() { return getToken(CypherParser::NO, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::NODE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::NODE() { return getToken(CypherParser::NODE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::PROJECT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::PROJECT() { return getToken(CypherParser::PROJECT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::READ() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::READ() { return getToken(CypherParser::READ, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::REL() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::REL() { return getToken(CypherParser::REL, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::RENAME() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::RENAME() { return getToken(CypherParser::RENAME, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::RETURN() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::RETURN() { return getToken(CypherParser::RETURN, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::ROLLBACK() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::ROLLBACK() { return getToken(CypherParser::ROLLBACK, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::ROLE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::ROLE() { return getToken(CypherParser::ROLE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::SEQUENCE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::SEQUENCE() { return getToken(CypherParser::SEQUENCE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::SET() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::SET() { return getToken(CypherParser::SET, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::START() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::START() { return getToken(CypherParser::START, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::STRUCT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::STRUCT() { return getToken(CypherParser::STRUCT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::L_SKIP() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::L_SKIP() { return getToken(CypherParser::L_SKIP, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::LIMIT() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::LIMIT() { return getToken(CypherParser::LIMIT, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::TRANSACTION() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::TRANSACTION() { return getToken(CypherParser::TRANSACTION, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::TYPE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::TYPE() { return getToken(CypherParser::TYPE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::USE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::USE() { return getToken(CypherParser::USE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::UNINSTALL() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::UNINSTALL() { return getToken(CypherParser::UNINSTALL, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::UPDATE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::UPDATE() { return getToken(CypherParser::UPDATE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::WRITE() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::WRITE() { return getToken(CypherParser::WRITE, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::FROM() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::FROM() { return getToken(CypherParser::FROM, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::TO() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::TO() { return getToken(CypherParser::TO, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::YIELD() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::YIELD() { return getToken(CypherParser::YIELD, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::USER() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::USER() { return getToken(CypherParser::USER, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::PASSWORD() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::PASSWORD() { return getToken(CypherParser::PASSWORD, 0); } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::MAP() { +tree::TerminalNode* CypherParser::RU_NonReservedKeywordsContext::MAP() { return getToken(CypherParser::MAP, 0); } -size_t CypherParser::KU_NonReservedKeywordsContext::getRuleIndex() const { - return CypherParser::RuleKU_NonReservedKeywords; +size_t CypherParser::RU_NonReservedKeywordsContext::getRuleIndex() const { + return CypherParser::RuleRU_NonReservedKeywords; } -CypherParser::KU_NonReservedKeywordsContext* CypherParser::kU_NonReservedKeywords() { - KU_NonReservedKeywordsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 350, CypherParser::RuleKU_NonReservedKeywords); +CypherParser::RU_NonReservedKeywordsContext* CypherParser::rU_NonReservedKeywords() { + RU_NonReservedKeywordsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 350, CypherParser::RuleRU_NonReservedKeywords); size_t _la = 0; #if __cplusplus > 201703L @@ -19368,8 +19368,8 @@ CypherParser::OC_DashContext* CypherParser::oC_Dash() { bool CypherParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) { switch (ruleIndex) { - case 57: return kU_DataTypeSempred(antlrcpp::downCast(context), predicateIndex); - case 84: return kU_JoinNodeSempred(antlrcpp::downCast(context), predicateIndex); + case 57: return rU_DataTypeSempred(antlrcpp::downCast(context), predicateIndex); + case 84: return rU_JoinNodeSempred(antlrcpp::downCast(context), predicateIndex); default: break; @@ -19377,7 +19377,7 @@ bool CypherParser::sempred(RuleContext *context, size_t ruleIndex, size_t predic return true; } -bool CypherParser::kU_DataTypeSempred(KU_DataTypeContext *_localctx, size_t predicateIndex) { +bool CypherParser::rU_DataTypeSempred(RU_DataTypeContext *_localctx, size_t predicateIndex) { switch (predicateIndex) { case 0: return precpred(_ctx, 5); @@ -19387,7 +19387,7 @@ bool CypherParser::kU_DataTypeSempred(KU_DataTypeContext *_localctx, size_t pred return true; } -bool CypherParser::kU_JoinNodeSempred(KU_JoinNodeContext *_localctx, size_t predicateIndex) { +bool CypherParser::rU_JoinNodeSempred(RU_JoinNodeContext *_localctx, size_t predicateIndex) { switch (predicateIndex) { case 1: return precpred(_ctx, 4); case 2: return precpred(_ctx, 3); diff --git a/third_party/antlr4_cypher/include/cypher_parser.h b/third_party/antlr4_cypher/include/cypher_parser.h index 7cfd61bda7..b77659f4e9 100644 --- a/third_party/antlr4_cypher/include/cypher_parser.h +++ b/third_party/antlr4_cypher/include/cypher_parser.h @@ -49,66 +49,66 @@ class CypherParser : public antlr4::Parser { }; enum { - RuleKu_Statements = 0, RuleOC_Cypher = 1, RuleOC_Statement = 2, RuleKU_CopyFrom = 3, - RuleKU_ColumnNames = 4, RuleKU_ScanSource = 5, RuleKU_CopyFromByColumn = 6, - RuleKU_CopyTO = 7, RuleKU_ExportDatabase = 8, RuleKU_ImportDatabase = 9, - RuleKU_AttachDatabase = 10, RuleKU_Option = 11, RuleKU_Options = 12, - RuleKU_DetachDatabase = 13, RuleKU_UseDatabase = 14, RuleKU_StandaloneCall = 15, - RuleKU_CommentOn = 16, RuleKU_CreateMacro = 17, RuleKU_PositionalArgs = 18, - RuleKU_DefaultArg = 19, RuleKU_FilePaths = 20, RuleKU_IfNotExists = 21, - RuleKU_CreateNodeTable = 22, RuleKU_CreateRelTable = 23, RuleKU_FromToConnections = 24, - RuleKU_FromToConnection = 25, RuleKU_CreateSequence = 26, RuleKU_CreateType = 27, - RuleKU_SequenceOptions = 28, RuleKU_WithPasswd = 29, RuleKU_CreateUser = 30, - RuleKU_CreateRole = 31, RuleKU_IncrementBy = 32, RuleKU_MinValue = 33, - RuleKU_MaxValue = 34, RuleKU_StartWith = 35, RuleKU_Cycle = 36, RuleKU_IfExists = 37, - RuleKU_Drop = 38, RuleKU_AlterTable = 39, RuleKU_AlterOptions = 40, - RuleKU_AddProperty = 41, RuleKU_Default = 42, RuleKU_DropProperty = 43, - RuleKU_RenameTable = 44, RuleKU_RenameProperty = 45, RuleKU_AddFromToConnection = 46, - RuleKU_DropFromToConnection = 47, RuleKU_ColumnDefinitions = 48, RuleKU_ColumnDefinition = 49, - RuleKU_PropertyDefinitions = 50, RuleKU_PropertyDefinition = 51, RuleKU_CreateNodeConstraint = 52, - RuleKU_UnionType = 53, RuleKU_StructType = 54, RuleKU_MapType = 55, - RuleKU_DecimalType = 56, RuleKU_DataType = 57, RuleKU_ListIdentifiers = 58, - RuleKU_ListIdentifier = 59, RuleOC_AnyCypherOption = 60, RuleOC_Explain = 61, - RuleOC_Profile = 62, RuleKU_Transaction = 63, RuleKU_Extension = 64, - RuleKU_LoadExtension = 65, RuleKU_InstallExtension = 66, RuleKU_UninstallExtension = 67, - RuleKU_UpdateExtension = 68, RuleOC_Query = 69, RuleOC_RegularQuery = 70, + RuleKu_Statements = 0, RuleOC_Cypher = 1, RuleOC_Statement = 2, RuleRU_CopyFrom = 3, + RuleRU_ColumnNames = 4, RuleRU_ScanSource = 5, RuleRU_CopyFromByColumn = 6, + RuleRU_CopyTO = 7, RuleRU_ExportDatabase = 8, RuleRU_ImportDatabase = 9, + RuleRU_AttachDatabase = 10, RuleRU_Option = 11, RuleRU_Options = 12, + RuleRU_DetachDatabase = 13, RuleRU_UseDatabase = 14, RuleRU_StandaloneCall = 15, + RuleRU_CommentOn = 16, RuleRU_CreateMacro = 17, RuleRU_PositionalArgs = 18, + RuleRU_DefaultArg = 19, RuleRU_FilePaths = 20, RuleRU_IfNotExists = 21, + RuleRU_CreateNodeTable = 22, RuleRU_CreateRelTable = 23, RuleRU_FromToConnections = 24, + RuleRU_FromToConnection = 25, RuleRU_CreateSequence = 26, RuleRU_CreateType = 27, + RuleRU_SequenceOptions = 28, RuleRU_WithPasswd = 29, RuleRU_CreateUser = 30, + RuleRU_CreateRole = 31, RuleRU_IncrementBy = 32, RuleRU_MinValue = 33, + RuleRU_MaxValue = 34, RuleRU_StartWith = 35, RuleRU_Cycle = 36, RuleRU_IfExists = 37, + RuleRU_Drop = 38, RuleRU_AlterTable = 39, RuleRU_AlterOptions = 40, + RuleRU_AddProperty = 41, RuleRU_Default = 42, RuleRU_DropProperty = 43, + RuleRU_RenameTable = 44, RuleRU_RenameProperty = 45, RuleRU_AddFromToConnection = 46, + RuleRU_DropFromToConnection = 47, RuleRU_ColumnDefinitions = 48, RuleRU_ColumnDefinition = 49, + RuleRU_PropertyDefinitions = 50, RuleRU_PropertyDefinition = 51, RuleRU_CreateNodeConstraint = 52, + RuleRU_UnionType = 53, RuleRU_StructType = 54, RuleRU_MapType = 55, + RuleRU_DecimalType = 56, RuleRU_DataType = 57, RuleRU_ListIdentifiers = 58, + RuleRU_ListIdentifier = 59, RuleOC_AnyCypherOption = 60, RuleOC_Explain = 61, + RuleOC_Profile = 62, RuleRU_Transaction = 63, RuleRU_Extension = 64, + RuleRU_LoadExtension = 65, RuleRU_InstallExtension = 66, RuleRU_UninstallExtension = 67, + RuleRU_UpdateExtension = 68, RuleOC_Query = 69, RuleOC_RegularQuery = 70, RuleOC_Union = 71, RuleOC_SingleQuery = 72, RuleOC_SinglePartQuery = 73, - RuleOC_MultiPartQuery = 74, RuleKU_QueryPart = 75, RuleOC_UpdatingClause = 76, - RuleOC_ReadingClause = 77, RuleKU_LoadFrom = 78, RuleOC_YieldItem = 79, - RuleOC_YieldItems = 80, RuleKU_InQueryCall = 81, RuleOC_Match = 82, - RuleKU_Hint = 83, RuleKU_JoinNode = 84, RuleOC_Unwind = 85, RuleOC_Create = 86, + RuleOC_MultiPartQuery = 74, RuleRU_QueryPart = 75, RuleOC_UpdatingClause = 76, + RuleOC_ReadingClause = 77, RuleRU_LoadFrom = 78, RuleOC_YieldItem = 79, + RuleOC_YieldItems = 80, RuleRU_InQueryCall = 81, RuleOC_Match = 82, + RuleRU_Hint = 83, RuleRU_JoinNode = 84, RuleOC_Unwind = 85, RuleOC_Create = 86, RuleOC_Merge = 87, RuleOC_MergeAction = 88, RuleOC_Set = 89, RuleOC_SetItem = 90, RuleOC_Delete = 91, RuleOC_With = 92, RuleOC_Return = 93, RuleOC_ProjectionBody = 94, RuleOC_ProjectionItems = 95, RuleOC_ProjectionItem = 96, RuleOC_Order = 97, RuleOC_Skip = 98, RuleOC_Limit = 99, RuleOC_SortItem = 100, RuleOC_Where = 101, RuleOC_Pattern = 102, RuleOC_PatternPart = 103, RuleOC_AnonymousPatternPart = 104, RuleOC_PatternElement = 105, RuleOC_NodePattern = 106, RuleOC_PatternElementChain = 107, - RuleOC_RelationshipPattern = 108, RuleOC_RelationshipDetail = 109, RuleKU_Properties = 110, - RuleOC_RelationshipTypes = 111, RuleOC_NodeLabels = 112, RuleKU_RecursiveDetail = 113, - RuleKU_RecursiveType = 114, RuleOC_RangeLiteral = 115, RuleKU_RecursiveComprehension = 116, - RuleKU_RecursiveProjectionItems = 117, RuleOC_LowerBound = 118, RuleOC_UpperBound = 119, + RuleOC_RelationshipPattern = 108, RuleOC_RelationshipDetail = 109, RuleRU_Properties = 110, + RuleOC_RelationshipTypes = 111, RuleOC_NodeLabels = 112, RuleRU_RecursiveDetail = 113, + RuleRU_RecursiveType = 114, RuleOC_RangeLiteral = 115, RuleRU_RecursiveComprehension = 116, + RuleRU_RecursiveProjectionItems = 117, RuleOC_LowerBound = 118, RuleOC_UpperBound = 119, RuleOC_LabelName = 120, RuleOC_RelTypeName = 121, RuleOC_Expression = 122, RuleOC_OrExpression = 123, RuleOC_XorExpression = 124, RuleOC_AndExpression = 125, - RuleOC_NotExpression = 126, RuleOC_ComparisonExpression = 127, RuleKU_ComparisonOperator = 128, - RuleKU_BitwiseOrOperatorExpression = 129, RuleKU_BitwiseAndOperatorExpression = 130, - RuleKU_BitShiftOperatorExpression = 131, RuleKU_BitShiftOperator = 132, - RuleOC_AddOrSubtractExpression = 133, RuleKU_AddOrSubtractOperator = 134, - RuleOC_MultiplyDivideModuloExpression = 135, RuleKU_MultiplyDivideModuloOperator = 136, + RuleOC_NotExpression = 126, RuleOC_ComparisonExpression = 127, RuleRU_ComparisonOperator = 128, + RuleRU_BitwiseOrOperatorExpression = 129, RuleRU_BitwiseAndOperatorExpression = 130, + RuleRU_BitShiftOperatorExpression = 131, RuleRU_BitShiftOperator = 132, + RuleOC_AddOrSubtractExpression = 133, RuleRU_AddOrSubtractOperator = 134, + RuleOC_MultiplyDivideModuloExpression = 135, RuleRU_MultiplyDivideModuloOperator = 136, RuleOC_PowerOfExpression = 137, RuleOC_StringListNullOperatorExpression = 138, RuleOC_ListOperatorExpression = 139, RuleOC_StringOperatorExpression = 140, RuleOC_RegularExpression = 141, RuleOC_NullOperatorExpression = 142, RuleOC_UnaryAddSubtractOrFactorialExpression = 143, RuleOC_PropertyOrLabelsExpression = 144, RuleOC_Atom = 145, RuleOC_Quantifier = 146, RuleOC_FilterExpression = 147, RuleOC_IdInColl = 148, RuleOC_Literal = 149, RuleOC_BooleanLiteral = 150, - RuleOC_ListLiteral = 151, RuleKU_ListEntry = 152, RuleKU_StructLiteral = 153, - RuleKU_StructField = 154, RuleOC_ParenthesizedExpression = 155, RuleOC_FunctionInvocation = 156, - RuleOC_FunctionName = 157, RuleKU_FunctionParameter = 158, RuleKU_LambdaParameter = 159, - RuleKU_LambdaVars = 160, RuleOC_PathPatterns = 161, RuleOC_ExistCountSubquery = 162, + RuleOC_ListLiteral = 151, RuleRU_ListEntry = 152, RuleRU_StructLiteral = 153, + RuleRU_StructField = 154, RuleOC_ParenthesizedExpression = 155, RuleOC_FunctionInvocation = 156, + RuleOC_FunctionName = 157, RuleRU_FunctionParameter = 158, RuleRU_LambdaParameter = 159, + RuleRU_LambdaVars = 160, RuleOC_PathPatterns = 161, RuleOC_ExistCountSubquery = 162, RuleOC_PropertyLookup = 163, RuleOC_CaseExpression = 164, RuleOC_CaseAlternative = 165, RuleOC_Variable = 166, RuleOC_NumberLiteral = 167, RuleOC_Parameter = 168, RuleOC_PropertyExpression = 169, RuleOC_PropertyKeyName = 170, RuleOC_IntegerLiteral = 171, RuleOC_DoubleLiteral = 172, RuleOC_SchemaName = 173, RuleOC_SymbolicName = 174, - RuleKU_NonReservedKeywords = 175, RuleOC_LeftArrowHead = 176, RuleOC_RightArrowHead = 177, + RuleRU_NonReservedKeywords = 175, RuleOC_LeftArrowHead = 176, RuleOC_RightArrowHead = 177, RuleOC_Dash = 178 }; @@ -132,88 +132,88 @@ class CypherParser : public antlr4::Parser { class Ku_StatementsContext; class OC_CypherContext; class OC_StatementContext; - class KU_CopyFromContext; - class KU_ColumnNamesContext; - class KU_ScanSourceContext; - class KU_CopyFromByColumnContext; - class KU_CopyTOContext; - class KU_ExportDatabaseContext; - class KU_ImportDatabaseContext; - class KU_AttachDatabaseContext; - class KU_OptionContext; - class KU_OptionsContext; - class KU_DetachDatabaseContext; - class KU_UseDatabaseContext; - class KU_StandaloneCallContext; - class KU_CommentOnContext; - class KU_CreateMacroContext; - class KU_PositionalArgsContext; - class KU_DefaultArgContext; - class KU_FilePathsContext; - class KU_IfNotExistsContext; - class KU_CreateNodeTableContext; - class KU_CreateRelTableContext; - class KU_FromToConnectionsContext; - class KU_FromToConnectionContext; - class KU_CreateSequenceContext; - class KU_CreateTypeContext; - class KU_SequenceOptionsContext; - class KU_WithPasswdContext; - class KU_CreateUserContext; - class KU_CreateRoleContext; - class KU_IncrementByContext; - class KU_MinValueContext; - class KU_MaxValueContext; - class KU_StartWithContext; - class KU_CycleContext; - class KU_IfExistsContext; - class KU_DropContext; - class KU_AlterTableContext; - class KU_AlterOptionsContext; - class KU_AddPropertyContext; - class KU_DefaultContext; - class KU_DropPropertyContext; - class KU_RenameTableContext; - class KU_RenamePropertyContext; - class KU_AddFromToConnectionContext; - class KU_DropFromToConnectionContext; - class KU_ColumnDefinitionsContext; - class KU_ColumnDefinitionContext; - class KU_PropertyDefinitionsContext; - class KU_PropertyDefinitionContext; - class KU_CreateNodeConstraintContext; - class KU_UnionTypeContext; - class KU_StructTypeContext; - class KU_MapTypeContext; - class KU_DecimalTypeContext; - class KU_DataTypeContext; - class KU_ListIdentifiersContext; - class KU_ListIdentifierContext; + class RU_CopyFromContext; + class RU_ColumnNamesContext; + class RU_ScanSourceContext; + class RU_CopyFromByColumnContext; + class RU_CopyTOContext; + class RU_ExportDatabaseContext; + class RU_ImportDatabaseContext; + class RU_AttachDatabaseContext; + class RU_OptionContext; + class RU_OptionsContext; + class RU_DetachDatabaseContext; + class RU_UseDatabaseContext; + class RU_StandaloneCallContext; + class RU_CommentOnContext; + class RU_CreateMacroContext; + class RU_PositionalArgsContext; + class RU_DefaultArgContext; + class RU_FilePathsContext; + class RU_IfNotExistsContext; + class RU_CreateNodeTableContext; + class RU_CreateRelTableContext; + class RU_FromToConnectionsContext; + class RU_FromToConnectionContext; + class RU_CreateSequenceContext; + class RU_CreateTypeContext; + class RU_SequenceOptionsContext; + class RU_WithPasswdContext; + class RU_CreateUserContext; + class RU_CreateRoleContext; + class RU_IncrementByContext; + class RU_MinValueContext; + class RU_MaxValueContext; + class RU_StartWithContext; + class RU_CycleContext; + class RU_IfExistsContext; + class RU_DropContext; + class RU_AlterTableContext; + class RU_AlterOptionsContext; + class RU_AddPropertyContext; + class RU_DefaultContext; + class RU_DropPropertyContext; + class RU_RenameTableContext; + class RU_RenamePropertyContext; + class RU_AddFromToConnectionContext; + class RU_DropFromToConnectionContext; + class RU_ColumnDefinitionsContext; + class RU_ColumnDefinitionContext; + class RU_PropertyDefinitionsContext; + class RU_PropertyDefinitionContext; + class RU_CreateNodeConstraintContext; + class RU_UnionTypeContext; + class RU_StructTypeContext; + class RU_MapTypeContext; + class RU_DecimalTypeContext; + class RU_DataTypeContext; + class RU_ListIdentifiersContext; + class RU_ListIdentifierContext; class OC_AnyCypherOptionContext; class OC_ExplainContext; class OC_ProfileContext; - class KU_TransactionContext; - class KU_ExtensionContext; - class KU_LoadExtensionContext; - class KU_InstallExtensionContext; - class KU_UninstallExtensionContext; - class KU_UpdateExtensionContext; + class RU_TransactionContext; + class RU_ExtensionContext; + class RU_LoadExtensionContext; + class RU_InstallExtensionContext; + class RU_UninstallExtensionContext; + class RU_UpdateExtensionContext; class OC_QueryContext; class OC_RegularQueryContext; class OC_UnionContext; class OC_SingleQueryContext; class OC_SinglePartQueryContext; class OC_MultiPartQueryContext; - class KU_QueryPartContext; + class RU_QueryPartContext; class OC_UpdatingClauseContext; class OC_ReadingClauseContext; - class KU_LoadFromContext; + class RU_LoadFromContext; class OC_YieldItemContext; class OC_YieldItemsContext; - class KU_InQueryCallContext; + class RU_InQueryCallContext; class OC_MatchContext; - class KU_HintContext; - class KU_JoinNodeContext; + class RU_HintContext; + class RU_JoinNodeContext; class OC_UnwindContext; class OC_CreateContext; class OC_MergeContext; @@ -239,14 +239,14 @@ class CypherParser : public antlr4::Parser { class OC_PatternElementChainContext; class OC_RelationshipPatternContext; class OC_RelationshipDetailContext; - class KU_PropertiesContext; + class RU_PropertiesContext; class OC_RelationshipTypesContext; class OC_NodeLabelsContext; - class KU_RecursiveDetailContext; - class KU_RecursiveTypeContext; + class RU_RecursiveDetailContext; + class RU_RecursiveTypeContext; class OC_RangeLiteralContext; - class KU_RecursiveComprehensionContext; - class KU_RecursiveProjectionItemsContext; + class RU_RecursiveComprehensionContext; + class RU_RecursiveProjectionItemsContext; class OC_LowerBoundContext; class OC_UpperBoundContext; class OC_LabelNameContext; @@ -257,15 +257,15 @@ class CypherParser : public antlr4::Parser { class OC_AndExpressionContext; class OC_NotExpressionContext; class OC_ComparisonExpressionContext; - class KU_ComparisonOperatorContext; - class KU_BitwiseOrOperatorExpressionContext; - class KU_BitwiseAndOperatorExpressionContext; - class KU_BitShiftOperatorExpressionContext; - class KU_BitShiftOperatorContext; + class RU_ComparisonOperatorContext; + class RU_BitwiseOrOperatorExpressionContext; + class RU_BitwiseAndOperatorExpressionContext; + class RU_BitShiftOperatorExpressionContext; + class RU_BitShiftOperatorContext; class OC_AddOrSubtractExpressionContext; - class KU_AddOrSubtractOperatorContext; + class RU_AddOrSubtractOperatorContext; class OC_MultiplyDivideModuloExpressionContext; - class KU_MultiplyDivideModuloOperatorContext; + class RU_MultiplyDivideModuloOperatorContext; class OC_PowerOfExpressionContext; class OC_StringListNullOperatorExpressionContext; class OC_ListOperatorExpressionContext; @@ -281,15 +281,15 @@ class CypherParser : public antlr4::Parser { class OC_LiteralContext; class OC_BooleanLiteralContext; class OC_ListLiteralContext; - class KU_ListEntryContext; - class KU_StructLiteralContext; - class KU_StructFieldContext; + class RU_ListEntryContext; + class RU_StructLiteralContext; + class RU_StructFieldContext; class OC_ParenthesizedExpressionContext; class OC_FunctionInvocationContext; class OC_FunctionNameContext; - class KU_FunctionParameterContext; - class KU_LambdaParameterContext; - class KU_LambdaVarsContext; + class RU_FunctionParameterContext; + class RU_LambdaParameterContext; + class RU_LambdaVarsContext; class OC_PathPatternsContext; class OC_ExistCountSubqueryContext; class OC_PropertyLookupContext; @@ -304,7 +304,7 @@ class CypherParser : public antlr4::Parser { class OC_DoubleLiteralContext; class OC_SchemaNameContext; class OC_SymbolicNameContext; - class KU_NonReservedKeywordsContext; + class RU_NonReservedKeywordsContext; class OC_LeftArrowHeadContext; class OC_RightArrowHeadContext; class OC_DashContext; @@ -343,54 +343,54 @@ class CypherParser : public antlr4::Parser { OC_StatementContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_QueryContext *oC_Query(); - KU_CreateUserContext *kU_CreateUser(); - KU_CreateRoleContext *kU_CreateRole(); - KU_CreateNodeTableContext *kU_CreateNodeTable(); - KU_CreateRelTableContext *kU_CreateRelTable(); - KU_CreateSequenceContext *kU_CreateSequence(); - KU_CreateTypeContext *kU_CreateType(); - KU_DropContext *kU_Drop(); - KU_AlterTableContext *kU_AlterTable(); - KU_CopyFromContext *kU_CopyFrom(); - KU_CopyFromByColumnContext *kU_CopyFromByColumn(); - KU_CopyTOContext *kU_CopyTO(); - KU_StandaloneCallContext *kU_StandaloneCall(); - KU_CreateMacroContext *kU_CreateMacro(); - KU_CommentOnContext *kU_CommentOn(); - KU_TransactionContext *kU_Transaction(); - KU_ExtensionContext *kU_Extension(); - KU_ExportDatabaseContext *kU_ExportDatabase(); - KU_ImportDatabaseContext *kU_ImportDatabase(); - KU_AttachDatabaseContext *kU_AttachDatabase(); - KU_DetachDatabaseContext *kU_DetachDatabase(); - KU_UseDatabaseContext *kU_UseDatabase(); + RU_CreateUserContext *rU_CreateUser(); + RU_CreateRoleContext *rU_CreateRole(); + RU_CreateNodeTableContext *rU_CreateNodeTable(); + RU_CreateRelTableContext *rU_CreateRelTable(); + RU_CreateSequenceContext *rU_CreateSequence(); + RU_CreateTypeContext *rU_CreateType(); + RU_DropContext *rU_Drop(); + RU_AlterTableContext *rU_AlterTable(); + RU_CopyFromContext *rU_CopyFrom(); + RU_CopyFromByColumnContext *rU_CopyFromByColumn(); + RU_CopyTOContext *rU_CopyTO(); + RU_StandaloneCallContext *rU_StandaloneCall(); + RU_CreateMacroContext *rU_CreateMacro(); + RU_CommentOnContext *rU_CommentOn(); + RU_TransactionContext *rU_Transaction(); + RU_ExtensionContext *rU_Extension(); + RU_ExportDatabaseContext *rU_ExportDatabase(); + RU_ImportDatabaseContext *rU_ImportDatabase(); + RU_AttachDatabaseContext *rU_AttachDatabase(); + RU_DetachDatabaseContext *rU_DetachDatabase(); + RU_UseDatabaseContext *rU_UseDatabase(); }; OC_StatementContext* oC_Statement(); - class KU_CopyFromContext : public antlr4::ParserRuleContext { + class RU_CopyFromContext : public antlr4::ParserRuleContext { public: - KU_CopyFromContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CopyFromContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *COPY(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_SchemaNameContext *oC_SchemaName(); antlr4::tree::TerminalNode *FROM(); - KU_ScanSourceContext *kU_ScanSource(); - KU_ColumnNamesContext *kU_ColumnNames(); - KU_OptionsContext *kU_Options(); + RU_ScanSourceContext *rU_ScanSource(); + RU_ColumnNamesContext *rU_ColumnNames(); + RU_OptionsContext *rU_Options(); }; - KU_CopyFromContext* kU_CopyFrom(); + RU_CopyFromContext* rU_CopyFrom(); - class KU_ColumnNamesContext : public antlr4::ParserRuleContext { + class RU_ColumnNamesContext : public antlr4::ParserRuleContext { public: - KU_ColumnNamesContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ColumnNamesContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -400,13 +400,13 @@ class CypherParser : public antlr4::Parser { }; - KU_ColumnNamesContext* kU_ColumnNames(); + RU_ColumnNamesContext* rU_ColumnNames(); - class KU_ScanSourceContext : public antlr4::ParserRuleContext { + class RU_ScanSourceContext : public antlr4::ParserRuleContext { public: - KU_ScanSourceContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ScanSourceContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - KU_FilePathsContext *kU_FilePaths(); + RU_FilePathsContext *rU_FilePaths(); OC_QueryContext *oC_Query(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -418,11 +418,11 @@ class CypherParser : public antlr4::Parser { }; - KU_ScanSourceContext* kU_ScanSource(); + RU_ScanSourceContext* rU_ScanSource(); - class KU_CopyFromByColumnContext : public antlr4::ParserRuleContext { + class RU_CopyFromByColumnContext : public antlr4::ParserRuleContext { public: - KU_CopyFromByColumnContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CopyFromByColumnContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *COPY(); std::vector SP(); @@ -437,11 +437,11 @@ class CypherParser : public antlr4::Parser { }; - KU_CopyFromByColumnContext* kU_CopyFromByColumn(); + RU_CopyFromByColumnContext* rU_CopyFromByColumn(); - class KU_CopyTOContext : public antlr4::ParserRuleContext { + class RU_CopyTOContext : public antlr4::ParserRuleContext { public: - KU_CopyTOContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CopyTOContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *COPY(); std::vector SP(); @@ -449,32 +449,32 @@ class CypherParser : public antlr4::Parser { OC_QueryContext *oC_Query(); antlr4::tree::TerminalNode *TO(); antlr4::tree::TerminalNode *StringLiteral(); - KU_OptionsContext *kU_Options(); + RU_OptionsContext *rU_Options(); }; - KU_CopyTOContext* kU_CopyTO(); + RU_CopyTOContext* rU_CopyTO(); - class KU_ExportDatabaseContext : public antlr4::ParserRuleContext { + class RU_ExportDatabaseContext : public antlr4::ParserRuleContext { public: - KU_ExportDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ExportDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *EXPORT(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *DATABASE(); antlr4::tree::TerminalNode *StringLiteral(); - KU_OptionsContext *kU_Options(); + RU_OptionsContext *rU_Options(); }; - KU_ExportDatabaseContext* kU_ExportDatabase(); + RU_ExportDatabaseContext* rU_ExportDatabase(); - class KU_ImportDatabaseContext : public antlr4::ParserRuleContext { + class RU_ImportDatabaseContext : public antlr4::ParserRuleContext { public: - KU_ImportDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ImportDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *IMPORT(); std::vector SP(); @@ -485,11 +485,11 @@ class CypherParser : public antlr4::Parser { }; - KU_ImportDatabaseContext* kU_ImportDatabase(); + RU_ImportDatabaseContext* rU_ImportDatabase(); - class KU_AttachDatabaseContext : public antlr4::ParserRuleContext { + class RU_AttachDatabaseContext : public antlr4::ParserRuleContext { public: - KU_AttachDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_AttachDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *ATTACH(); std::vector SP(); @@ -499,16 +499,16 @@ class CypherParser : public antlr4::Parser { OC_SymbolicNameContext *oC_SymbolicName(); antlr4::tree::TerminalNode *AS(); OC_SchemaNameContext *oC_SchemaName(); - KU_OptionsContext *kU_Options(); + RU_OptionsContext *rU_Options(); }; - KU_AttachDatabaseContext* kU_AttachDatabase(); + RU_AttachDatabaseContext* rU_AttachDatabase(); - class KU_OptionContext : public antlr4::ParserRuleContext { + class RU_OptionContext : public antlr4::ParserRuleContext { public: - KU_OptionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_OptionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_SymbolicNameContext *oC_SymbolicName(); OC_LiteralContext *oC_Literal(); @@ -518,25 +518,25 @@ class CypherParser : public antlr4::Parser { }; - KU_OptionContext* kU_Option(); + RU_OptionContext* rU_Option(); - class KU_OptionsContext : public antlr4::ParserRuleContext { + class RU_OptionsContext : public antlr4::ParserRuleContext { public: - KU_OptionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_OptionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_Option(); - KU_OptionContext* kU_Option(size_t i); + std::vector rU_Option(); + RU_OptionContext* rU_Option(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_OptionsContext* kU_Options(); + RU_OptionsContext* rU_Options(); - class KU_DetachDatabaseContext : public antlr4::ParserRuleContext { + class RU_DetachDatabaseContext : public antlr4::ParserRuleContext { public: - KU_DetachDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DetachDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *DETACH(); antlr4::tree::TerminalNode *SP(); @@ -545,11 +545,11 @@ class CypherParser : public antlr4::Parser { }; - KU_DetachDatabaseContext* kU_DetachDatabase(); + RU_DetachDatabaseContext* rU_DetachDatabase(); - class KU_UseDatabaseContext : public antlr4::ParserRuleContext { + class RU_UseDatabaseContext : public antlr4::ParserRuleContext { public: - KU_UseDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_UseDatabaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *USE(); antlr4::tree::TerminalNode *SP(); @@ -558,11 +558,11 @@ class CypherParser : public antlr4::Parser { }; - KU_UseDatabaseContext* kU_UseDatabase(); + RU_UseDatabaseContext* rU_UseDatabase(); - class KU_StandaloneCallContext : public antlr4::ParserRuleContext { + class RU_StandaloneCallContext : public antlr4::ParserRuleContext { public: - KU_StandaloneCallContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_StandaloneCallContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CALL(); std::vector SP(); @@ -574,11 +574,11 @@ class CypherParser : public antlr4::Parser { }; - KU_StandaloneCallContext* kU_StandaloneCall(); + RU_StandaloneCallContext* rU_StandaloneCall(); - class KU_CommentOnContext : public antlr4::ParserRuleContext { + class RU_CommentOnContext : public antlr4::ParserRuleContext { public: - KU_CommentOnContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CommentOnContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *COMMENT(); std::vector SP(); @@ -592,11 +592,11 @@ class CypherParser : public antlr4::Parser { }; - KU_CommentOnContext* kU_CommentOn(); + RU_CommentOnContext* rU_CommentOn(); - class KU_CreateMacroContext : public antlr4::ParserRuleContext { + class RU_CreateMacroContext : public antlr4::ParserRuleContext { public: - KU_CreateMacroContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateMacroContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CREATE(); std::vector SP(); @@ -605,18 +605,18 @@ class CypherParser : public antlr4::Parser { OC_FunctionNameContext *oC_FunctionName(); antlr4::tree::TerminalNode *AS(); OC_ExpressionContext *oC_Expression(); - KU_PositionalArgsContext *kU_PositionalArgs(); - std::vector kU_DefaultArg(); - KU_DefaultArgContext* kU_DefaultArg(size_t i); + RU_PositionalArgsContext *rU_PositionalArgs(); + std::vector rU_DefaultArg(); + RU_DefaultArgContext* rU_DefaultArg(size_t i); }; - KU_CreateMacroContext* kU_CreateMacro(); + RU_CreateMacroContext* rU_CreateMacro(); - class KU_PositionalArgsContext : public antlr4::ParserRuleContext { + class RU_PositionalArgsContext : public antlr4::ParserRuleContext { public: - KU_PositionalArgsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_PositionalArgsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector oC_SymbolicName(); OC_SymbolicNameContext* oC_SymbolicName(size_t i); @@ -626,11 +626,11 @@ class CypherParser : public antlr4::Parser { }; - KU_PositionalArgsContext* kU_PositionalArgs(); + RU_PositionalArgsContext* rU_PositionalArgs(); - class KU_DefaultArgContext : public antlr4::ParserRuleContext { + class RU_DefaultArgContext : public antlr4::ParserRuleContext { public: - KU_DefaultArgContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DefaultArgContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_SymbolicNameContext *oC_SymbolicName(); antlr4::tree::TerminalNode *COLON(); @@ -641,11 +641,11 @@ class CypherParser : public antlr4::Parser { }; - KU_DefaultArgContext* kU_DefaultArg(); + RU_DefaultArgContext* rU_DefaultArg(); - class KU_FilePathsContext : public antlr4::ParserRuleContext { + class RU_FilePathsContext : public antlr4::ParserRuleContext { public: - KU_FilePathsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_FilePathsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector StringLiteral(); antlr4::tree::TerminalNode* StringLiteral(size_t i); @@ -656,11 +656,11 @@ class CypherParser : public antlr4::Parser { }; - KU_FilePathsContext* kU_FilePaths(); + RU_FilePathsContext* rU_FilePaths(); - class KU_IfNotExistsContext : public antlr4::ParserRuleContext { + class RU_IfNotExistsContext : public antlr4::ParserRuleContext { public: - KU_IfNotExistsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_IfNotExistsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *IF(); std::vector SP(); @@ -671,11 +671,11 @@ class CypherParser : public antlr4::Parser { }; - KU_IfNotExistsContext* kU_IfNotExists(); + RU_IfNotExistsContext* rU_IfNotExists(); - class KU_CreateNodeTableContext : public antlr4::ParserRuleContext { + class RU_CreateNodeTableContext : public antlr4::ParserRuleContext { public: - KU_CreateNodeTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateNodeTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CREATE(); std::vector SP(); @@ -683,20 +683,20 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode *NODE(); antlr4::tree::TerminalNode *TABLE(); OC_SchemaNameContext *oC_SchemaName(); - KU_PropertyDefinitionsContext *kU_PropertyDefinitions(); + RU_PropertyDefinitionsContext *rU_PropertyDefinitions(); antlr4::tree::TerminalNode *AS(); OC_QueryContext *oC_Query(); - KU_IfNotExistsContext *kU_IfNotExists(); - KU_CreateNodeConstraintContext *kU_CreateNodeConstraint(); + RU_IfNotExistsContext *rU_IfNotExists(); + RU_CreateNodeConstraintContext *rU_CreateNodeConstraint(); }; - KU_CreateNodeTableContext* kU_CreateNodeTable(); + RU_CreateNodeTableContext* rU_CreateNodeTable(); - class KU_CreateRelTableContext : public antlr4::ParserRuleContext { + class RU_CreateRelTableContext : public antlr4::ParserRuleContext { public: - KU_CreateRelTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateRelTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CREATE(); std::vector SP(); @@ -704,38 +704,38 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode *REL(); antlr4::tree::TerminalNode *TABLE(); OC_SchemaNameContext *oC_SchemaName(); - KU_FromToConnectionsContext *kU_FromToConnections(); + RU_FromToConnectionsContext *rU_FromToConnections(); antlr4::tree::TerminalNode *AS(); OC_QueryContext *oC_Query(); antlr4::tree::TerminalNode *GROUP(); - KU_IfNotExistsContext *kU_IfNotExists(); + RU_IfNotExistsContext *rU_IfNotExists(); antlr4::tree::TerminalNode *WITH(); - KU_OptionsContext *kU_Options(); - KU_PropertyDefinitionsContext *kU_PropertyDefinitions(); + RU_OptionsContext *rU_Options(); + RU_PropertyDefinitionsContext *rU_PropertyDefinitions(); OC_SymbolicNameContext *oC_SymbolicName(); }; - KU_CreateRelTableContext* kU_CreateRelTable(); + RU_CreateRelTableContext* rU_CreateRelTable(); - class KU_FromToConnectionsContext : public antlr4::ParserRuleContext { + class RU_FromToConnectionsContext : public antlr4::ParserRuleContext { public: - KU_FromToConnectionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_FromToConnectionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_FromToConnection(); - KU_FromToConnectionContext* kU_FromToConnection(size_t i); + std::vector rU_FromToConnection(); + RU_FromToConnectionContext* rU_FromToConnection(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_FromToConnectionsContext* kU_FromToConnections(); + RU_FromToConnectionsContext* rU_FromToConnections(); - class KU_FromToConnectionContext : public antlr4::ParserRuleContext { + class RU_FromToConnectionContext : public antlr4::ParserRuleContext { public: - KU_FromToConnectionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_FromToConnectionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *FROM(); std::vector SP(); @@ -747,29 +747,29 @@ class CypherParser : public antlr4::Parser { }; - KU_FromToConnectionContext* kU_FromToConnection(); + RU_FromToConnectionContext* rU_FromToConnection(); - class KU_CreateSequenceContext : public antlr4::ParserRuleContext { + class RU_CreateSequenceContext : public antlr4::ParserRuleContext { public: - KU_CreateSequenceContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateSequenceContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CREATE(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *SEQUENCE(); OC_SchemaNameContext *oC_SchemaName(); - KU_IfNotExistsContext *kU_IfNotExists(); - std::vector kU_SequenceOptions(); - KU_SequenceOptionsContext* kU_SequenceOptions(size_t i); + RU_IfNotExistsContext *rU_IfNotExists(); + std::vector rU_SequenceOptions(); + RU_SequenceOptionsContext* rU_SequenceOptions(size_t i); }; - KU_CreateSequenceContext* kU_CreateSequence(); + RU_CreateSequenceContext* rU_CreateSequence(); - class KU_CreateTypeContext : public antlr4::ParserRuleContext { + class RU_CreateTypeContext : public antlr4::ParserRuleContext { public: - KU_CreateTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CREATE(); std::vector SP(); @@ -777,31 +777,31 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode *TYPE(); OC_SchemaNameContext *oC_SchemaName(); antlr4::tree::TerminalNode *AS(); - KU_DataTypeContext *kU_DataType(); + RU_DataTypeContext *rU_DataType(); }; - KU_CreateTypeContext* kU_CreateType(); + RU_CreateTypeContext* rU_CreateType(); - class KU_SequenceOptionsContext : public antlr4::ParserRuleContext { + class RU_SequenceOptionsContext : public antlr4::ParserRuleContext { public: - KU_SequenceOptionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_SequenceOptionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - KU_IncrementByContext *kU_IncrementBy(); - KU_MinValueContext *kU_MinValue(); - KU_MaxValueContext *kU_MaxValue(); - KU_StartWithContext *kU_StartWith(); - KU_CycleContext *kU_Cycle(); + RU_IncrementByContext *rU_IncrementBy(); + RU_MinValueContext *rU_MinValue(); + RU_MaxValueContext *rU_MaxValue(); + RU_StartWithContext *rU_StartWith(); + RU_CycleContext *rU_Cycle(); }; - KU_SequenceOptionsContext* kU_SequenceOptions(); + RU_SequenceOptionsContext* rU_SequenceOptions(); - class KU_WithPasswdContext : public antlr4::ParserRuleContext { + class RU_WithPasswdContext : public antlr4::ParserRuleContext { public: - KU_WithPasswdContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_WithPasswdContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -812,44 +812,44 @@ class CypherParser : public antlr4::Parser { }; - KU_WithPasswdContext* kU_WithPasswd(); + RU_WithPasswdContext* rU_WithPasswd(); - class KU_CreateUserContext : public antlr4::ParserRuleContext { + class RU_CreateUserContext : public antlr4::ParserRuleContext { public: - KU_CreateUserContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateUserContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CREATE(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *USER(); OC_VariableContext *oC_Variable(); - KU_IfNotExistsContext *kU_IfNotExists(); - KU_WithPasswdContext *kU_WithPasswd(); + RU_IfNotExistsContext *rU_IfNotExists(); + RU_WithPasswdContext *rU_WithPasswd(); }; - KU_CreateUserContext* kU_CreateUser(); + RU_CreateUserContext* rU_CreateUser(); - class KU_CreateRoleContext : public antlr4::ParserRuleContext { + class RU_CreateRoleContext : public antlr4::ParserRuleContext { public: - KU_CreateRoleContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateRoleContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CREATE(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *ROLE(); OC_VariableContext *oC_Variable(); - KU_IfNotExistsContext *kU_IfNotExists(); + RU_IfNotExistsContext *rU_IfNotExists(); }; - KU_CreateRoleContext* kU_CreateRole(); + RU_CreateRoleContext* rU_CreateRole(); - class KU_IncrementByContext : public antlr4::ParserRuleContext { + class RU_IncrementByContext : public antlr4::ParserRuleContext { public: - KU_IncrementByContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_IncrementByContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *INCREMENT(); std::vector SP(); @@ -861,11 +861,11 @@ class CypherParser : public antlr4::Parser { }; - KU_IncrementByContext* kU_IncrementBy(); + RU_IncrementByContext* rU_IncrementBy(); - class KU_MinValueContext : public antlr4::ParserRuleContext { + class RU_MinValueContext : public antlr4::ParserRuleContext { public: - KU_MinValueContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_MinValueContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *NO(); antlr4::tree::TerminalNode *SP(); @@ -876,11 +876,11 @@ class CypherParser : public antlr4::Parser { }; - KU_MinValueContext* kU_MinValue(); + RU_MinValueContext* rU_MinValue(); - class KU_MaxValueContext : public antlr4::ParserRuleContext { + class RU_MaxValueContext : public antlr4::ParserRuleContext { public: - KU_MaxValueContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_MaxValueContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *NO(); antlr4::tree::TerminalNode *SP(); @@ -891,11 +891,11 @@ class CypherParser : public antlr4::Parser { }; - KU_MaxValueContext* kU_MaxValue(); + RU_MaxValueContext* rU_MaxValue(); - class KU_StartWithContext : public antlr4::ParserRuleContext { + class RU_StartWithContext : public antlr4::ParserRuleContext { public: - KU_StartWithContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_StartWithContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *START(); std::vector SP(); @@ -907,11 +907,11 @@ class CypherParser : public antlr4::Parser { }; - KU_StartWithContext* kU_StartWith(); + RU_StartWithContext* rU_StartWith(); - class KU_CycleContext : public antlr4::ParserRuleContext { + class RU_CycleContext : public antlr4::ParserRuleContext { public: - KU_CycleContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CycleContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CYCLE(); antlr4::tree::TerminalNode *NO(); @@ -920,11 +920,11 @@ class CypherParser : public antlr4::Parser { }; - KU_CycleContext* kU_Cycle(); + RU_CycleContext* rU_Cycle(); - class KU_IfExistsContext : public antlr4::ParserRuleContext { + class RU_IfExistsContext : public antlr4::ParserRuleContext { public: - KU_IfExistsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_IfExistsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *IF(); antlr4::tree::TerminalNode *SP(); @@ -933,11 +933,11 @@ class CypherParser : public antlr4::Parser { }; - KU_IfExistsContext* kU_IfExists(); + RU_IfExistsContext* rU_IfExists(); - class KU_DropContext : public antlr4::ParserRuleContext { + class RU_DropContext : public antlr4::ParserRuleContext { public: - KU_DropContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DropContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *DROP(); std::vector SP(); @@ -946,65 +946,65 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode *TABLE(); antlr4::tree::TerminalNode *SEQUENCE(); antlr4::tree::TerminalNode *MACRO(); - KU_IfExistsContext *kU_IfExists(); + RU_IfExistsContext *rU_IfExists(); }; - KU_DropContext* kU_Drop(); + RU_DropContext* rU_Drop(); - class KU_AlterTableContext : public antlr4::ParserRuleContext { + class RU_AlterTableContext : public antlr4::ParserRuleContext { public: - KU_AlterTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_AlterTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *ALTER(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *TABLE(); OC_SchemaNameContext *oC_SchemaName(); - KU_AlterOptionsContext *kU_AlterOptions(); + RU_AlterOptionsContext *rU_AlterOptions(); }; - KU_AlterTableContext* kU_AlterTable(); + RU_AlterTableContext* rU_AlterTable(); - class KU_AlterOptionsContext : public antlr4::ParserRuleContext { + class RU_AlterOptionsContext : public antlr4::ParserRuleContext { public: - KU_AlterOptionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_AlterOptionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - KU_AddPropertyContext *kU_AddProperty(); - KU_DropPropertyContext *kU_DropProperty(); - KU_RenameTableContext *kU_RenameTable(); - KU_RenamePropertyContext *kU_RenameProperty(); - KU_AddFromToConnectionContext *kU_AddFromToConnection(); - KU_DropFromToConnectionContext *kU_DropFromToConnection(); + RU_AddPropertyContext *rU_AddProperty(); + RU_DropPropertyContext *rU_DropProperty(); + RU_RenameTableContext *rU_RenameTable(); + RU_RenamePropertyContext *rU_RenameProperty(); + RU_AddFromToConnectionContext *rU_AddFromToConnection(); + RU_DropFromToConnectionContext *rU_DropFromToConnection(); }; - KU_AlterOptionsContext* kU_AlterOptions(); + RU_AlterOptionsContext* rU_AlterOptions(); - class KU_AddPropertyContext : public antlr4::ParserRuleContext { + class RU_AddPropertyContext : public antlr4::ParserRuleContext { public: - KU_AddPropertyContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_AddPropertyContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *ADD(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_PropertyKeyNameContext *oC_PropertyKeyName(); - KU_DataTypeContext *kU_DataType(); - KU_IfNotExistsContext *kU_IfNotExists(); - KU_DefaultContext *kU_Default(); + RU_DataTypeContext *rU_DataType(); + RU_IfNotExistsContext *rU_IfNotExists(); + RU_DefaultContext *rU_Default(); }; - KU_AddPropertyContext* kU_AddProperty(); + RU_AddPropertyContext* rU_AddProperty(); - class KU_DefaultContext : public antlr4::ParserRuleContext { + class RU_DefaultContext : public antlr4::ParserRuleContext { public: - KU_DefaultContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DefaultContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *DEFAULT(); antlr4::tree::TerminalNode *SP(); @@ -1013,26 +1013,26 @@ class CypherParser : public antlr4::Parser { }; - KU_DefaultContext* kU_Default(); + RU_DefaultContext* rU_Default(); - class KU_DropPropertyContext : public antlr4::ParserRuleContext { + class RU_DropPropertyContext : public antlr4::ParserRuleContext { public: - KU_DropPropertyContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DropPropertyContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *DROP(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_PropertyKeyNameContext *oC_PropertyKeyName(); - KU_IfExistsContext *kU_IfExists(); + RU_IfExistsContext *rU_IfExists(); }; - KU_DropPropertyContext* kU_DropProperty(); + RU_DropPropertyContext* rU_DropProperty(); - class KU_RenameTableContext : public antlr4::ParserRuleContext { + class RU_RenameTableContext : public antlr4::ParserRuleContext { public: - KU_RenameTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_RenameTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *RENAME(); std::vector SP(); @@ -1043,11 +1043,11 @@ class CypherParser : public antlr4::Parser { }; - KU_RenameTableContext* kU_RenameTable(); + RU_RenameTableContext* rU_RenameTable(); - class KU_RenamePropertyContext : public antlr4::ParserRuleContext { + class RU_RenamePropertyContext : public antlr4::ParserRuleContext { public: - KU_RenamePropertyContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_RenamePropertyContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *RENAME(); std::vector SP(); @@ -1059,98 +1059,98 @@ class CypherParser : public antlr4::Parser { }; - KU_RenamePropertyContext* kU_RenameProperty(); + RU_RenamePropertyContext* rU_RenameProperty(); - class KU_AddFromToConnectionContext : public antlr4::ParserRuleContext { + class RU_AddFromToConnectionContext : public antlr4::ParserRuleContext { public: - KU_AddFromToConnectionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_AddFromToConnectionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *ADD(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); - KU_FromToConnectionContext *kU_FromToConnection(); - KU_IfNotExistsContext *kU_IfNotExists(); + RU_FromToConnectionContext *rU_FromToConnection(); + RU_IfNotExistsContext *rU_IfNotExists(); }; - KU_AddFromToConnectionContext* kU_AddFromToConnection(); + RU_AddFromToConnectionContext* rU_AddFromToConnection(); - class KU_DropFromToConnectionContext : public antlr4::ParserRuleContext { + class RU_DropFromToConnectionContext : public antlr4::ParserRuleContext { public: - KU_DropFromToConnectionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DropFromToConnectionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *DROP(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); - KU_FromToConnectionContext *kU_FromToConnection(); - KU_IfExistsContext *kU_IfExists(); + RU_FromToConnectionContext *rU_FromToConnection(); + RU_IfExistsContext *rU_IfExists(); }; - KU_DropFromToConnectionContext* kU_DropFromToConnection(); + RU_DropFromToConnectionContext* rU_DropFromToConnection(); - class KU_ColumnDefinitionsContext : public antlr4::ParserRuleContext { + class RU_ColumnDefinitionsContext : public antlr4::ParserRuleContext { public: - KU_ColumnDefinitionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ColumnDefinitionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_ColumnDefinition(); - KU_ColumnDefinitionContext* kU_ColumnDefinition(size_t i); + std::vector rU_ColumnDefinition(); + RU_ColumnDefinitionContext* rU_ColumnDefinition(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_ColumnDefinitionsContext* kU_ColumnDefinitions(); + RU_ColumnDefinitionsContext* rU_ColumnDefinitions(); - class KU_ColumnDefinitionContext : public antlr4::ParserRuleContext { + class RU_ColumnDefinitionContext : public antlr4::ParserRuleContext { public: - KU_ColumnDefinitionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ColumnDefinitionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_PropertyKeyNameContext *oC_PropertyKeyName(); antlr4::tree::TerminalNode *SP(); - KU_DataTypeContext *kU_DataType(); + RU_DataTypeContext *rU_DataType(); }; - KU_ColumnDefinitionContext* kU_ColumnDefinition(); + RU_ColumnDefinitionContext* rU_ColumnDefinition(); - class KU_PropertyDefinitionsContext : public antlr4::ParserRuleContext { + class RU_PropertyDefinitionsContext : public antlr4::ParserRuleContext { public: - KU_PropertyDefinitionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_PropertyDefinitionsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_PropertyDefinition(); - KU_PropertyDefinitionContext* kU_PropertyDefinition(size_t i); + std::vector rU_PropertyDefinition(); + RU_PropertyDefinitionContext* rU_PropertyDefinition(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_PropertyDefinitionsContext* kU_PropertyDefinitions(); + RU_PropertyDefinitionsContext* rU_PropertyDefinitions(); - class KU_PropertyDefinitionContext : public antlr4::ParserRuleContext { + class RU_PropertyDefinitionContext : public antlr4::ParserRuleContext { public: - KU_PropertyDefinitionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_PropertyDefinitionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - KU_ColumnDefinitionContext *kU_ColumnDefinition(); + RU_ColumnDefinitionContext *rU_ColumnDefinition(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); - KU_DefaultContext *kU_Default(); + RU_DefaultContext *rU_Default(); antlr4::tree::TerminalNode *PRIMARY(); antlr4::tree::TerminalNode *KEY(); }; - KU_PropertyDefinitionContext* kU_PropertyDefinition(); + RU_PropertyDefinitionContext* rU_PropertyDefinition(); - class KU_CreateNodeConstraintContext : public antlr4::ParserRuleContext { + class RU_CreateNodeConstraintContext : public antlr4::ParserRuleContext { public: - KU_CreateNodeConstraintContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_CreateNodeConstraintContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *PRIMARY(); std::vector SP(); @@ -1161,54 +1161,54 @@ class CypherParser : public antlr4::Parser { }; - KU_CreateNodeConstraintContext* kU_CreateNodeConstraint(); + RU_CreateNodeConstraintContext* rU_CreateNodeConstraint(); - class KU_UnionTypeContext : public antlr4::ParserRuleContext { + class RU_UnionTypeContext : public antlr4::ParserRuleContext { public: - KU_UnionTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_UnionTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *UNION(); - KU_ColumnDefinitionsContext *kU_ColumnDefinitions(); + RU_ColumnDefinitionsContext *rU_ColumnDefinitions(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_UnionTypeContext* kU_UnionType(); + RU_UnionTypeContext* rU_UnionType(); - class KU_StructTypeContext : public antlr4::ParserRuleContext { + class RU_StructTypeContext : public antlr4::ParserRuleContext { public: - KU_StructTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_StructTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *STRUCT(); - KU_ColumnDefinitionsContext *kU_ColumnDefinitions(); + RU_ColumnDefinitionsContext *rU_ColumnDefinitions(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_StructTypeContext* kU_StructType(); + RU_StructTypeContext* rU_StructType(); - class KU_MapTypeContext : public antlr4::ParserRuleContext { + class RU_MapTypeContext : public antlr4::ParserRuleContext { public: - KU_MapTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_MapTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *MAP(); - std::vector kU_DataType(); - KU_DataTypeContext* kU_DataType(size_t i); + std::vector rU_DataType(); + RU_DataTypeContext* rU_DataType(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_MapTypeContext* kU_MapType(); + RU_MapTypeContext* rU_MapType(); - class KU_DecimalTypeContext : public antlr4::ParserRuleContext { + class RU_DecimalTypeContext : public antlr4::ParserRuleContext { public: - KU_DecimalTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DecimalTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *DECIMAL(); std::vector oC_IntegerLiteral(); @@ -1219,47 +1219,47 @@ class CypherParser : public antlr4::Parser { }; - KU_DecimalTypeContext* kU_DecimalType(); + RU_DecimalTypeContext* rU_DecimalType(); - class KU_DataTypeContext : public antlr4::ParserRuleContext { + class RU_DataTypeContext : public antlr4::ParserRuleContext { public: - KU_DataTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_DataTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_SymbolicNameContext *oC_SymbolicName(); - KU_UnionTypeContext *kU_UnionType(); - KU_StructTypeContext *kU_StructType(); - KU_MapTypeContext *kU_MapType(); - KU_DecimalTypeContext *kU_DecimalType(); - KU_DataTypeContext *kU_DataType(); - KU_ListIdentifiersContext *kU_ListIdentifiers(); + RU_UnionTypeContext *rU_UnionType(); + RU_StructTypeContext *rU_StructType(); + RU_MapTypeContext *rU_MapType(); + RU_DecimalTypeContext *rU_DecimalType(); + RU_DataTypeContext *rU_DataType(); + RU_ListIdentifiersContext *rU_ListIdentifiers(); }; - KU_DataTypeContext* kU_DataType(); - KU_DataTypeContext* kU_DataType(int precedence); - class KU_ListIdentifiersContext : public antlr4::ParserRuleContext { + RU_DataTypeContext* rU_DataType(); + RU_DataTypeContext* rU_DataType(int precedence); + class RU_ListIdentifiersContext : public antlr4::ParserRuleContext { public: - KU_ListIdentifiersContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ListIdentifiersContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_ListIdentifier(); - KU_ListIdentifierContext* kU_ListIdentifier(size_t i); + std::vector rU_ListIdentifier(); + RU_ListIdentifierContext* rU_ListIdentifier(size_t i); }; - KU_ListIdentifiersContext* kU_ListIdentifiers(); + RU_ListIdentifiersContext* rU_ListIdentifiers(); - class KU_ListIdentifierContext : public antlr4::ParserRuleContext { + class RU_ListIdentifierContext : public antlr4::ParserRuleContext { public: - KU_ListIdentifierContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ListIdentifierContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_IntegerLiteralContext *oC_IntegerLiteral(); }; - KU_ListIdentifierContext* kU_ListIdentifier(); + RU_ListIdentifierContext* rU_ListIdentifier(); class OC_AnyCypherOptionContext : public antlr4::ParserRuleContext { public: @@ -1297,9 +1297,9 @@ class CypherParser : public antlr4::Parser { OC_ProfileContext* oC_Profile(); - class KU_TransactionContext : public antlr4::ParserRuleContext { + class RU_TransactionContext : public antlr4::ParserRuleContext { public: - KU_TransactionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_TransactionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *BEGIN(); std::vector SP(); @@ -1314,25 +1314,25 @@ class CypherParser : public antlr4::Parser { }; - KU_TransactionContext* kU_Transaction(); + RU_TransactionContext* rU_Transaction(); - class KU_ExtensionContext : public antlr4::ParserRuleContext { + class RU_ExtensionContext : public antlr4::ParserRuleContext { public: - KU_ExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - KU_LoadExtensionContext *kU_LoadExtension(); - KU_InstallExtensionContext *kU_InstallExtension(); - KU_UninstallExtensionContext *kU_UninstallExtension(); - KU_UpdateExtensionContext *kU_UpdateExtension(); + RU_LoadExtensionContext *rU_LoadExtension(); + RU_InstallExtensionContext *rU_InstallExtension(); + RU_UninstallExtensionContext *rU_UninstallExtension(); + RU_UpdateExtensionContext *rU_UpdateExtension(); }; - KU_ExtensionContext* kU_Extension(); + RU_ExtensionContext* rU_Extension(); - class KU_LoadExtensionContext : public antlr4::ParserRuleContext { + class RU_LoadExtensionContext : public antlr4::ParserRuleContext { public: - KU_LoadExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_LoadExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *LOAD(); std::vector SP(); @@ -1344,11 +1344,11 @@ class CypherParser : public antlr4::Parser { }; - KU_LoadExtensionContext* kU_LoadExtension(); + RU_LoadExtensionContext* rU_LoadExtension(); - class KU_InstallExtensionContext : public antlr4::ParserRuleContext { + class RU_InstallExtensionContext : public antlr4::ParserRuleContext { public: - KU_InstallExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_InstallExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *INSTALL(); std::vector SP(); @@ -1361,11 +1361,11 @@ class CypherParser : public antlr4::Parser { }; - KU_InstallExtensionContext* kU_InstallExtension(); + RU_InstallExtensionContext* rU_InstallExtension(); - class KU_UninstallExtensionContext : public antlr4::ParserRuleContext { + class RU_UninstallExtensionContext : public antlr4::ParserRuleContext { public: - KU_UninstallExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_UninstallExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *UNINSTALL(); antlr4::tree::TerminalNode *SP(); @@ -1374,11 +1374,11 @@ class CypherParser : public antlr4::Parser { }; - KU_UninstallExtensionContext* kU_UninstallExtension(); + RU_UninstallExtensionContext* rU_UninstallExtension(); - class KU_UpdateExtensionContext : public antlr4::ParserRuleContext { + class RU_UpdateExtensionContext : public antlr4::ParserRuleContext { public: - KU_UpdateExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_UpdateExtensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *UPDATE(); antlr4::tree::TerminalNode *SP(); @@ -1387,7 +1387,7 @@ class CypherParser : public antlr4::Parser { }; - KU_UpdateExtensionContext* kU_UpdateExtension(); + RU_UpdateExtensionContext* rU_UpdateExtension(); class OC_QueryContext : public antlr4::ParserRuleContext { public: @@ -1466,8 +1466,8 @@ class CypherParser : public antlr4::Parser { OC_MultiPartQueryContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_SinglePartQueryContext *oC_SinglePartQuery(); - std::vector kU_QueryPart(); - KU_QueryPartContext* kU_QueryPart(size_t i); + std::vector rU_QueryPart(); + RU_QueryPartContext* rU_QueryPart(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -1476,9 +1476,9 @@ class CypherParser : public antlr4::Parser { OC_MultiPartQueryContext* oC_MultiPartQuery(); - class KU_QueryPartContext : public antlr4::ParserRuleContext { + class RU_QueryPartContext : public antlr4::ParserRuleContext { public: - KU_QueryPartContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_QueryPartContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_WithContext *oC_With(); std::vector oC_ReadingClause(); @@ -1491,7 +1491,7 @@ class CypherParser : public antlr4::Parser { }; - KU_QueryPartContext* kU_QueryPart(); + RU_QueryPartContext* rU_QueryPart(); class OC_UpdatingClauseContext : public antlr4::ParserRuleContext { public: @@ -1513,33 +1513,33 @@ class CypherParser : public antlr4::Parser { virtual size_t getRuleIndex() const override; OC_MatchContext *oC_Match(); OC_UnwindContext *oC_Unwind(); - KU_InQueryCallContext *kU_InQueryCall(); - KU_LoadFromContext *kU_LoadFrom(); + RU_InQueryCallContext *rU_InQueryCall(); + RU_LoadFromContext *rU_LoadFrom(); }; OC_ReadingClauseContext* oC_ReadingClause(); - class KU_LoadFromContext : public antlr4::ParserRuleContext { + class RU_LoadFromContext : public antlr4::ParserRuleContext { public: - KU_LoadFromContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_LoadFromContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *LOAD(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *FROM(); - KU_ScanSourceContext *kU_ScanSource(); + RU_ScanSourceContext *rU_ScanSource(); antlr4::tree::TerminalNode *WITH(); antlr4::tree::TerminalNode *HEADERS(); - KU_ColumnDefinitionsContext *kU_ColumnDefinitions(); - KU_OptionsContext *kU_Options(); + RU_ColumnDefinitionsContext *rU_ColumnDefinitions(); + RU_OptionsContext *rU_Options(); OC_WhereContext *oC_Where(); }; - KU_LoadFromContext* kU_LoadFrom(); + RU_LoadFromContext* rU_LoadFrom(); class OC_YieldItemContext : public antlr4::ParserRuleContext { public: @@ -1570,9 +1570,9 @@ class CypherParser : public antlr4::Parser { OC_YieldItemsContext* oC_YieldItems(); - class KU_InQueryCallContext : public antlr4::ParserRuleContext { + class RU_InQueryCallContext : public antlr4::ParserRuleContext { public: - KU_InQueryCallContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_InQueryCallContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *CALL(); std::vector SP(); @@ -1585,7 +1585,7 @@ class CypherParser : public antlr4::Parser { }; - KU_InQueryCallContext* kU_InQueryCall(); + RU_InQueryCallContext* rU_InQueryCall(); class OC_MatchContext : public antlr4::ParserRuleContext { public: @@ -1597,32 +1597,32 @@ class CypherParser : public antlr4::Parser { std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_WhereContext *oC_Where(); - KU_HintContext *kU_Hint(); + RU_HintContext *rU_Hint(); }; OC_MatchContext* oC_Match(); - class KU_HintContext : public antlr4::ParserRuleContext { + class RU_HintContext : public antlr4::ParserRuleContext { public: - KU_HintContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_HintContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *HINT(); antlr4::tree::TerminalNode *SP(); - KU_JoinNodeContext *kU_JoinNode(); + RU_JoinNodeContext *rU_JoinNode(); }; - KU_HintContext* kU_Hint(); + RU_HintContext* rU_Hint(); - class KU_JoinNodeContext : public antlr4::ParserRuleContext { + class RU_JoinNodeContext : public antlr4::ParserRuleContext { public: - KU_JoinNodeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_JoinNodeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_JoinNode(); - KU_JoinNodeContext* kU_JoinNode(size_t i); + std::vector rU_JoinNode(); + RU_JoinNodeContext* rU_JoinNode(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); std::vector oC_SchemaName(); @@ -1634,8 +1634,8 @@ class CypherParser : public antlr4::Parser { }; - KU_JoinNodeContext* kU_JoinNode(); - KU_JoinNodeContext* kU_JoinNode(int precedence); + RU_JoinNodeContext* rU_JoinNode(); + RU_JoinNodeContext* rU_JoinNode(int precedence); class OC_UnwindContext : public antlr4::ParserRuleContext { public: OC_UnwindContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -1707,7 +1707,7 @@ class CypherParser : public antlr4::Parser { std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_AtomContext *oC_Atom(); - KU_PropertiesContext *kU_Properties(); + RU_PropertiesContext *rU_Properties(); }; @@ -1951,7 +1951,7 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode* SP(size_t i); OC_VariableContext *oC_Variable(); OC_NodeLabelsContext *oC_NodeLabels(); - KU_PropertiesContext *kU_Properties(); + RU_PropertiesContext *rU_Properties(); }; @@ -1996,17 +1996,17 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode* SP(size_t i); OC_VariableContext *oC_Variable(); OC_RelationshipTypesContext *oC_RelationshipTypes(); - KU_RecursiveDetailContext *kU_RecursiveDetail(); - KU_PropertiesContext *kU_Properties(); + RU_RecursiveDetailContext *rU_RecursiveDetail(); + RU_PropertiesContext *rU_Properties(); }; OC_RelationshipDetailContext* oC_RelationshipDetail(); - class KU_PropertiesContext : public antlr4::ParserRuleContext { + class RU_PropertiesContext : public antlr4::ParserRuleContext { public: - KU_PropertiesContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_PropertiesContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -2020,7 +2020,7 @@ class CypherParser : public antlr4::Parser { }; - KU_PropertiesContext* kU_Properties(); + RU_PropertiesContext* rU_Properties(); class OC_RelationshipTypesContext : public antlr4::ParserRuleContext { public: @@ -2054,25 +2054,25 @@ class CypherParser : public antlr4::Parser { OC_NodeLabelsContext* oC_NodeLabels(); - class KU_RecursiveDetailContext : public antlr4::ParserRuleContext { + class RU_RecursiveDetailContext : public antlr4::ParserRuleContext { public: - KU_RecursiveDetailContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_RecursiveDetailContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *STAR(); - KU_RecursiveTypeContext *kU_RecursiveType(); + RU_RecursiveTypeContext *rU_RecursiveType(); OC_RangeLiteralContext *oC_RangeLiteral(); - KU_RecursiveComprehensionContext *kU_RecursiveComprehension(); + RU_RecursiveComprehensionContext *rU_RecursiveComprehension(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_RecursiveDetailContext* kU_RecursiveDetail(); + RU_RecursiveDetailContext* rU_RecursiveDetail(); - class KU_RecursiveTypeContext : public antlr4::ParserRuleContext { + class RU_RecursiveTypeContext : public antlr4::ParserRuleContext { public: - KU_RecursiveTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_RecursiveTypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *WSHORTEST(); OC_PropertyKeyNameContext *oC_PropertyKeyName(); @@ -2086,7 +2086,7 @@ class CypherParser : public antlr4::Parser { }; - KU_RecursiveTypeContext* kU_RecursiveType(); + RU_RecursiveTypeContext* rU_RecursiveType(); class OC_RangeLiteralContext : public antlr4::ParserRuleContext { public: @@ -2104,26 +2104,26 @@ class CypherParser : public antlr4::Parser { OC_RangeLiteralContext* oC_RangeLiteral(); - class KU_RecursiveComprehensionContext : public antlr4::ParserRuleContext { + class RU_RecursiveComprehensionContext : public antlr4::ParserRuleContext { public: - KU_RecursiveComprehensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_RecursiveComprehensionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector oC_Variable(); OC_VariableContext* oC_Variable(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_WhereContext *oC_Where(); - std::vector kU_RecursiveProjectionItems(); - KU_RecursiveProjectionItemsContext* kU_RecursiveProjectionItems(size_t i); + std::vector rU_RecursiveProjectionItems(); + RU_RecursiveProjectionItemsContext* rU_RecursiveProjectionItems(size_t i); }; - KU_RecursiveComprehensionContext* kU_RecursiveComprehension(); + RU_RecursiveComprehensionContext* rU_RecursiveComprehension(); - class KU_RecursiveProjectionItemsContext : public antlr4::ParserRuleContext { + class RU_RecursiveProjectionItemsContext : public antlr4::ParserRuleContext { public: - KU_RecursiveProjectionItemsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_RecursiveProjectionItemsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -2132,7 +2132,7 @@ class CypherParser : public antlr4::Parser { }; - KU_RecursiveProjectionItemsContext* kU_RecursiveProjectionItems(); + RU_RecursiveProjectionItemsContext* rU_RecursiveProjectionItems(); class OC_LowerBoundContext : public antlr4::ParserRuleContext { public: @@ -2257,10 +2257,10 @@ class CypherParser : public antlr4::Parser { antlr4::Token *invalid_not_equalToken = nullptr; OC_ComparisonExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_BitwiseOrOperatorExpression(); - KU_BitwiseOrOperatorExpressionContext* kU_BitwiseOrOperatorExpression(size_t i); - std::vector kU_ComparisonOperator(); - KU_ComparisonOperatorContext* kU_ComparisonOperator(size_t i); + std::vector rU_BitwiseOrOperatorExpression(); + RU_BitwiseOrOperatorExpressionContext* rU_BitwiseOrOperatorExpression(size_t i); + std::vector rU_ComparisonOperator(); + RU_ComparisonOperatorContext* rU_ComparisonOperator(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *INVALID_NOT_EQUAL(); @@ -2270,69 +2270,69 @@ class CypherParser : public antlr4::Parser { OC_ComparisonExpressionContext* oC_ComparisonExpression(); - class KU_ComparisonOperatorContext : public antlr4::ParserRuleContext { + class RU_ComparisonOperatorContext : public antlr4::ParserRuleContext { public: - KU_ComparisonOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ComparisonOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; }; - KU_ComparisonOperatorContext* kU_ComparisonOperator(); + RU_ComparisonOperatorContext* rU_ComparisonOperator(); - class KU_BitwiseOrOperatorExpressionContext : public antlr4::ParserRuleContext { + class RU_BitwiseOrOperatorExpressionContext : public antlr4::ParserRuleContext { public: - KU_BitwiseOrOperatorExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_BitwiseOrOperatorExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_BitwiseAndOperatorExpression(); - KU_BitwiseAndOperatorExpressionContext* kU_BitwiseAndOperatorExpression(size_t i); + std::vector rU_BitwiseAndOperatorExpression(); + RU_BitwiseAndOperatorExpressionContext* rU_BitwiseAndOperatorExpression(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_BitwiseOrOperatorExpressionContext* kU_BitwiseOrOperatorExpression(); + RU_BitwiseOrOperatorExpressionContext* rU_BitwiseOrOperatorExpression(); - class KU_BitwiseAndOperatorExpressionContext : public antlr4::ParserRuleContext { + class RU_BitwiseAndOperatorExpressionContext : public antlr4::ParserRuleContext { public: - KU_BitwiseAndOperatorExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_BitwiseAndOperatorExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_BitShiftOperatorExpression(); - KU_BitShiftOperatorExpressionContext* kU_BitShiftOperatorExpression(size_t i); + std::vector rU_BitShiftOperatorExpression(); + RU_BitShiftOperatorExpressionContext* rU_BitShiftOperatorExpression(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_BitwiseAndOperatorExpressionContext* kU_BitwiseAndOperatorExpression(); + RU_BitwiseAndOperatorExpressionContext* rU_BitwiseAndOperatorExpression(); - class KU_BitShiftOperatorExpressionContext : public antlr4::ParserRuleContext { + class RU_BitShiftOperatorExpressionContext : public antlr4::ParserRuleContext { public: - KU_BitShiftOperatorExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_BitShiftOperatorExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector oC_AddOrSubtractExpression(); OC_AddOrSubtractExpressionContext* oC_AddOrSubtractExpression(size_t i); - std::vector kU_BitShiftOperator(); - KU_BitShiftOperatorContext* kU_BitShiftOperator(size_t i); + std::vector rU_BitShiftOperator(); + RU_BitShiftOperatorContext* rU_BitShiftOperator(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_BitShiftOperatorExpressionContext* kU_BitShiftOperatorExpression(); + RU_BitShiftOperatorExpressionContext* rU_BitShiftOperatorExpression(); - class KU_BitShiftOperatorContext : public antlr4::ParserRuleContext { + class RU_BitShiftOperatorContext : public antlr4::ParserRuleContext { public: - KU_BitShiftOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_BitShiftOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; }; - KU_BitShiftOperatorContext* kU_BitShiftOperator(); + RU_BitShiftOperatorContext* rU_BitShiftOperator(); class OC_AddOrSubtractExpressionContext : public antlr4::ParserRuleContext { public: @@ -2340,8 +2340,8 @@ class CypherParser : public antlr4::Parser { virtual size_t getRuleIndex() const override; std::vector oC_MultiplyDivideModuloExpression(); OC_MultiplyDivideModuloExpressionContext* oC_MultiplyDivideModuloExpression(size_t i); - std::vector kU_AddOrSubtractOperator(); - KU_AddOrSubtractOperatorContext* kU_AddOrSubtractOperator(size_t i); + std::vector rU_AddOrSubtractOperator(); + RU_AddOrSubtractOperatorContext* rU_AddOrSubtractOperator(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -2350,16 +2350,16 @@ class CypherParser : public antlr4::Parser { OC_AddOrSubtractExpressionContext* oC_AddOrSubtractExpression(); - class KU_AddOrSubtractOperatorContext : public antlr4::ParserRuleContext { + class RU_AddOrSubtractOperatorContext : public antlr4::ParserRuleContext { public: - KU_AddOrSubtractOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_AddOrSubtractOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *MINUS(); }; - KU_AddOrSubtractOperatorContext* kU_AddOrSubtractOperator(); + RU_AddOrSubtractOperatorContext* rU_AddOrSubtractOperator(); class OC_MultiplyDivideModuloExpressionContext : public antlr4::ParserRuleContext { public: @@ -2367,8 +2367,8 @@ class CypherParser : public antlr4::Parser { virtual size_t getRuleIndex() const override; std::vector oC_PowerOfExpression(); OC_PowerOfExpressionContext* oC_PowerOfExpression(size_t i); - std::vector kU_MultiplyDivideModuloOperator(); - KU_MultiplyDivideModuloOperatorContext* kU_MultiplyDivideModuloOperator(size_t i); + std::vector rU_MultiplyDivideModuloOperator(); + RU_MultiplyDivideModuloOperatorContext* rU_MultiplyDivideModuloOperator(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); @@ -2377,16 +2377,16 @@ class CypherParser : public antlr4::Parser { OC_MultiplyDivideModuloExpressionContext* oC_MultiplyDivideModuloExpression(); - class KU_MultiplyDivideModuloOperatorContext : public antlr4::ParserRuleContext { + class RU_MultiplyDivideModuloOperatorContext : public antlr4::ParserRuleContext { public: - KU_MultiplyDivideModuloOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_MultiplyDivideModuloOperatorContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *STAR(); }; - KU_MultiplyDivideModuloOperatorContext* kU_MultiplyDivideModuloOperator(); + RU_MultiplyDivideModuloOperatorContext* rU_MultiplyDivideModuloOperator(); class OC_PowerOfExpressionContext : public antlr4::ParserRuleContext { public: @@ -2583,7 +2583,7 @@ class CypherParser : public antlr4::Parser { OC_BooleanLiteralContext *oC_BooleanLiteral(); antlr4::tree::TerminalNode *NULL_(); OC_ListLiteralContext *oC_ListLiteral(); - KU_StructLiteralContext *kU_StructLiteral(); + RU_StructLiteralContext *rU_StructLiteral(); }; @@ -2609,17 +2609,17 @@ class CypherParser : public antlr4::Parser { std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_ExpressionContext *oC_Expression(); - std::vector kU_ListEntry(); - KU_ListEntryContext* kU_ListEntry(size_t i); + std::vector rU_ListEntry(); + RU_ListEntryContext* rU_ListEntry(size_t i); }; OC_ListLiteralContext* oC_ListLiteral(); - class KU_ListEntryContext : public antlr4::ParserRuleContext { + class RU_ListEntryContext : public antlr4::ParserRuleContext { public: - KU_ListEntryContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_ListEntryContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *SP(); OC_ExpressionContext *oC_Expression(); @@ -2627,25 +2627,25 @@ class CypherParser : public antlr4::Parser { }; - KU_ListEntryContext* kU_ListEntry(); + RU_ListEntryContext* rU_ListEntry(); - class KU_StructLiteralContext : public antlr4::ParserRuleContext { + class RU_StructLiteralContext : public antlr4::ParserRuleContext { public: - KU_StructLiteralContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_StructLiteralContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector kU_StructField(); - KU_StructFieldContext* kU_StructField(size_t i); + std::vector rU_StructField(); + RU_StructFieldContext* rU_StructField(size_t i); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); }; - KU_StructLiteralContext* kU_StructLiteral(); + RU_StructLiteralContext* rU_StructLiteral(); - class KU_StructFieldContext : public antlr4::ParserRuleContext { + class RU_StructFieldContext : public antlr4::ParserRuleContext { public: - KU_StructFieldContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_StructFieldContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *COLON(); OC_ExpressionContext *oC_Expression(); @@ -2657,7 +2657,7 @@ class CypherParser : public antlr4::Parser { }; - KU_StructFieldContext* kU_StructField(); + RU_StructFieldContext* rU_StructField(); class OC_ParenthesizedExpressionContext : public antlr4::ParserRuleContext { public: @@ -2681,10 +2681,10 @@ class CypherParser : public antlr4::Parser { std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *CAST(); - std::vector kU_FunctionParameter(); - KU_FunctionParameterContext* kU_FunctionParameter(size_t i); + std::vector rU_FunctionParameter(); + RU_FunctionParameterContext* rU_FunctionParameter(size_t i); antlr4::tree::TerminalNode *AS(); - KU_DataTypeContext *kU_DataType(); + RU_DataTypeContext *rU_DataType(); OC_FunctionNameContext *oC_FunctionName(); antlr4::tree::TerminalNode *DISTINCT(); @@ -2704,27 +2704,27 @@ class CypherParser : public antlr4::Parser { OC_FunctionNameContext* oC_FunctionName(); - class KU_FunctionParameterContext : public antlr4::ParserRuleContext { + class RU_FunctionParameterContext : public antlr4::ParserRuleContext { public: - KU_FunctionParameterContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_FunctionParameterContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; OC_ExpressionContext *oC_Expression(); OC_SymbolicNameContext *oC_SymbolicName(); antlr4::tree::TerminalNode *COLON(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); - KU_LambdaParameterContext *kU_LambdaParameter(); + RU_LambdaParameterContext *rU_LambdaParameter(); }; - KU_FunctionParameterContext* kU_FunctionParameter(); + RU_FunctionParameterContext* rU_FunctionParameter(); - class KU_LambdaParameterContext : public antlr4::ParserRuleContext { + class RU_LambdaParameterContext : public antlr4::ParserRuleContext { public: - KU_LambdaParameterContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_LambdaParameterContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - KU_LambdaVarsContext *kU_LambdaVars(); + RU_LambdaVarsContext *rU_LambdaVars(); antlr4::tree::TerminalNode *MINUS(); OC_ExpressionContext *oC_Expression(); std::vector SP(); @@ -2733,11 +2733,11 @@ class CypherParser : public antlr4::Parser { }; - KU_LambdaParameterContext* kU_LambdaParameter(); + RU_LambdaParameterContext* rU_LambdaParameter(); - class KU_LambdaVarsContext : public antlr4::ParserRuleContext { + class RU_LambdaVarsContext : public antlr4::ParserRuleContext { public: - KU_LambdaVarsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_LambdaVarsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector oC_SymbolicName(); OC_SymbolicNameContext* oC_SymbolicName(size_t i); @@ -2747,7 +2747,7 @@ class CypherParser : public antlr4::Parser { }; - KU_LambdaVarsContext* kU_LambdaVars(); + RU_LambdaVarsContext* rU_LambdaVars(); class OC_PathPatternsContext : public antlr4::ParserRuleContext { public: @@ -2775,7 +2775,7 @@ class CypherParser : public antlr4::Parser { std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); OC_WhereContext *oC_Where(); - KU_HintContext *kU_Hint(); + RU_HintContext *rU_Hint(); }; @@ -2931,16 +2931,16 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode *UnescapedSymbolicName(); antlr4::tree::TerminalNode *EscapedSymbolicName(); antlr4::tree::TerminalNode *HexLetter(); - KU_NonReservedKeywordsContext *kU_NonReservedKeywords(); + RU_NonReservedKeywordsContext *rU_NonReservedKeywords(); }; OC_SymbolicNameContext* oC_SymbolicName(); - class KU_NonReservedKeywordsContext : public antlr4::ParserRuleContext { + class RU_NonReservedKeywordsContext : public antlr4::ParserRuleContext { public: - KU_NonReservedKeywordsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RU_NonReservedKeywordsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *COMMENT(); antlr4::tree::TerminalNode *ADD(); @@ -3008,7 +3008,7 @@ class CypherParser : public antlr4::Parser { }; - KU_NonReservedKeywordsContext* kU_NonReservedKeywords(); + RU_NonReservedKeywordsContext* rU_NonReservedKeywords(); class OC_LeftArrowHeadContext : public antlr4::ParserRuleContext { public: @@ -3044,8 +3044,8 @@ class CypherParser : public antlr4::Parser { bool sempred(antlr4::RuleContext *_localctx, size_t ruleIndex, size_t predicateIndex) override; - bool kU_DataTypeSempred(KU_DataTypeContext *_localctx, size_t predicateIndex); - bool kU_JoinNodeSempred(KU_JoinNodeContext *_localctx, size_t predicateIndex); + bool rU_DataTypeSempred(RU_DataTypeContext *_localctx, size_t predicateIndex); + bool rU_JoinNodeSempred(RU_JoinNodeContext *_localctx, size_t predicateIndex); // By default the static state used to implement the parser is lazily initialized during the first // call to the constructor. You can call this function if you wish to initialize the static state diff --git a/tools/benchmark/benchmark.cpp b/tools/benchmark/benchmark.cpp index 15622ef896..dff64d805e 100644 --- a/tools/benchmark/benchmark.cpp +++ b/tools/benchmark/benchmark.cpp @@ -22,7 +22,7 @@ Benchmark::Benchmark(const std::string& benchmarkPath, Database* database, Bench void Benchmark::loadBenchmark(const std::string& benchmarkPath) { BenchmarkParser parser; const auto parsedBenchmarks = parser.parseBenchmarkFile(benchmarkPath); - KU_ASSERT(parsedBenchmarks.size() == 1); + RYU_ASSERT(parsedBenchmarks.size() == 1); const auto queryConfig = parsedBenchmarks[0].get(); preRun = queryConfig->preRun; query = queryConfig->query; diff --git a/tools/benchmark/benchmark_parser.cpp b/tools/benchmark/benchmark_parser.cpp index 7ddeee6b5c..9bc8830bae 100644 --- a/tools/benchmark/benchmark_parser.cpp +++ b/tools/benchmark/benchmark_parser.cpp @@ -37,26 +37,26 @@ std::vector> BenchmarkParser::parseBenchmarkFil result.push_back(std::move(config)); currentConfig->name = line.substr(6, line.length()); } else if (line.starts_with("-QUERY")) { - KU_ASSERT(currentConfig); + RYU_ASSERT(currentConfig); currentConfig->query = line.substr(7, line.length()); replaceVariables(currentConfig->query); } else if (line.starts_with("-PRERUN")) { - KU_ASSERT(currentConfig); + RYU_ASSERT(currentConfig); currentConfig->preRun = line.substr(8, line.length()); replaceVariables(currentConfig->preRun); } else if (line.starts_with("-POSTRUN")) { - KU_ASSERT(currentConfig); + RYU_ASSERT(currentConfig); replaceVariables(currentConfig->postRun); currentConfig->postRun = line.substr(9, line.length()); } else if (line.starts_with("-PARALLELISM")) { - KU_ASSERT(currentConfig); + RYU_ASSERT(currentConfig); currentConfig->numThreads = stoi(line.substr(13, line.length())); } else if (line.starts_with("-SKIP_COMPARE_RESULT")) { - KU_ASSERT(currentConfig); + RYU_ASSERT(currentConfig); currentConfig->compareResult = false; } else if (line.starts_with("----")) { uint64_t numTuples = stoi(line.substr(5, line.length())); - KU_ASSERT(currentConfig); + RYU_ASSERT(currentConfig); currentConfig->expectedNumTuples = numTuples; if (currentConfig->compareResult) { for (auto i = 0u; i < numTuples; i++) { diff --git a/tools/java_api/src/jni/ryu_java.cpp b/tools/java_api/src/jni/ryu_java.cpp index 648e2fcfe9..64445f605f 100644 --- a/tools/java_api/src/jni/ryu_java.cpp +++ b/tools/java_api/src/jni/ryu_java.cpp @@ -1753,8 +1753,8 @@ JNIEXPORT jobject JNICALL Java_com_ryugraph_Native_ryuCreateMap(JNIEnv* env, jcl jobjectArray keys, jobjectArray values) { try { jsize len = env->GetArrayLength(keys); - KU_ASSERT(env->GetArrayLength(values) == len); - KU_ASSERT(len > 0); + RYU_ASSERT(env->GetArrayLength(values) == len); + RYU_ASSERT(len > 0); std::optional keyType; std::optional valueType; @@ -1768,7 +1768,7 @@ JNIEXPORT jobject JNICALL Java_com_ryugraph_Native_ryuCreateMap(JNIEnv* env, jcl keyType = key->getDataType().copy(); valueType = value->getDataType().copy(); } else { - KU_ASSERT(valueType.has_value()); + RYU_ASSERT(valueType.has_value()); if (key->getDataType() != *keyType || value->getDataType() != *valueType) { return nullptr; } @@ -1785,8 +1785,8 @@ JNIEXPORT jobject JNICALL Java_com_ryugraph_Native_ryuCreateMap(JNIEnv* env, jcl LogicalType::STRUCT(std::move(structFields)), std::move(structVals))); } - KU_ASSERT(keyType.has_value()); - KU_ASSERT(valueType.has_value()); + RYU_ASSERT(keyType.has_value()); + RYU_ASSERT(valueType.has_value()); Value* mapValue = new Value(LogicalType::MAP(std::move(*keyType), std::move(*valueType)), std::move(children)); return createJavaObject(env, mapValue, J_C_Value, J_C_Value_F_v_ref); @@ -1802,8 +1802,8 @@ JNIEXPORT jobject JNICALL Java_com_ryugraph_Native_ryuCreateStruct(JNIEnv* env, jobjectArray fieldNames, jobjectArray fieldValues) { try { jsize len = env->GetArrayLength(fieldNames); - KU_ASSERT(env->GetArrayLength(fieldValues) == len); - KU_ASSERT(len > 0); + RYU_ASSERT(env->GetArrayLength(fieldValues) == len); + RYU_ASSERT(len > 0); std::vector> children; auto structFields = std::vector{}; diff --git a/tools/nodejs_api/src_cpp/node_util.cpp b/tools/nodejs_api/src_cpp/node_util.cpp index 8852dbe27e..739b9018b0 100644 --- a/tools/nodejs_api/src_cpp/node_util.cpp +++ b/tools/nodejs_api/src_cpp/node_util.cpp @@ -208,8 +208,8 @@ std::unordered_map> Util::TransformParameter std::unordered_map> result; for (size_t i = 0; i < params.Length(); i++) { auto param = params.Get(i).As(); - KU_ASSERT(param.Length() == 2); - KU_ASSERT(param.Get(uint32_t(0)).IsString()); + RYU_ASSERT(param.Length() == 2); + RYU_ASSERT(param.Get(uint32_t(0)).IsString()); auto key = param.Get(uint32_t(0)).ToString().Utf8Value(); auto napiValue = param.Get(uint32_t(1)); auto transformedVal = TransformNapiValue(napiValue); diff --git a/tools/python_api/src_cpp/include/py_object_container.h b/tools/python_api/src_cpp/include/py_object_container.h index a92c2fb0e5..a486ded97e 100644 --- a/tools/python_api/src_cpp/include/py_object_container.h +++ b/tools/python_api/src_cpp/include/py_object_container.h @@ -22,7 +22,7 @@ class PythonObjectContainer { } const py::object& getLastAddedObject() { - KU_ASSERT(!pyObjects.empty()); + RYU_ASSERT(!pyObjects.empty()); return pyObjects.back(); } diff --git a/tools/python_api/src_cpp/numpy/numpy_scan.cpp b/tools/python_api/src_cpp/numpy/numpy_scan.cpp index 2e6ac06c63..9eb2dbc76f 100644 --- a/tools/python_api/src_cpp/numpy/numpy_scan.cpp +++ b/tools/python_api/src_cpp/numpy/numpy_scan.cpp @@ -22,11 +22,11 @@ void ScanNumpyColumn(py::array& npArray, uint64_t offset, ValueVector* outputVec template void scanNumpyMasked(PandasColumnBindData* bindData, uint64_t count, uint64_t offset, ValueVector* outputVector) { - KU_ASSERT(bindData->pandasCol->getBackEnd() == PandasColumnBackend::NUMPY); + RYU_ASSERT(bindData->pandasCol->getBackEnd() == PandasColumnBackend::NUMPY); auto& npColumn = reinterpret_cast(*bindData->pandasCol); ScanNumpyColumn(npColumn.array, offset, outputVector, count); if (bindData->mask != nullptr) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } @@ -52,7 +52,7 @@ static void appendPythonUnicode(T* codepoints, uint64_t codepointLength, uint64_t utf8StrLen = 0; for (auto i = 0u; i < codepointLength; i++) { auto len = utf8proc::Utf8Proc::codepointLength(int(codepoints[i])); - KU_ASSERT(len >= 1); + RYU_ASSERT(len >= 1); utf8StrLen += len; } auto& strToAppend = StringVector::reserveString(vectorToAppend, pos, utf8StrLen); @@ -63,7 +63,7 @@ static void appendPythonUnicode(T* codepoints, uint64_t codepointLength, auto dataToWrite = (char*)strToAppend.getData(); for (auto i = 0u; i < codepointLength; i++) { utf8proc::Utf8Proc::codepointToUtf8(int(codepoints[i]), codePointLen, dataToWrite); - KU_ASSERT(codePointLen >= 1); + RYU_ASSERT(codePointLen >= 1); dataToWrite += codePointLen; } if (!ku_string_t::isShortString(utf8StrLen)) { @@ -73,7 +73,7 @@ static void appendPythonUnicode(T* codepoints, uint64_t codepointLength, void NumpyScan::scan(PandasColumnBindData* bindData, uint64_t count, uint64_t offset, common::ValueVector* outputVector) { - KU_ASSERT(bindData->pandasCol->getBackEnd() == PandasColumnBackend::NUMPY); + RYU_ASSERT(bindData->pandasCol->getBackEnd() == PandasColumnBackend::NUMPY); auto& npCol = reinterpret_cast(*bindData->pandasCol); auto& array = npCol.array; @@ -200,7 +200,7 @@ void NumpyScan::scan(PandasColumnBindData* bindData, uint64_t count, uint64_t of PyStrUtil::getUnicodeStrLen(strHandle), outputVector, i); break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } else { // LCOV_EXCL_START @@ -212,7 +212,7 @@ void NumpyScan::scan(PandasColumnBindData* bindData, uint64_t count, uint64_t of break; } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/tools/python_api/src_cpp/numpy/numpy_type.cpp b/tools/python_api/src_cpp/numpy/numpy_type.cpp index 8158762d5b..9bfb5a63cc 100644 --- a/tools/python_api/src_cpp/numpy/numpy_type.cpp +++ b/tools/python_api/src_cpp/numpy/numpy_type.cpp @@ -83,7 +83,7 @@ static NumpyNullableType convertNumpyTypeInternal(const std::string& colTypeStr) if (colTypeStr == "object" || colTypeStr == "string") { return NumpyNullableType::OBJECT; } - KU_UNREACHABLE; + RYU_UNREACHABLE; } NumpyType NumpyTypeUtils::convertNumpyType(const py::handle& colType) { @@ -142,7 +142,7 @@ LogicalType NumpyTypeUtils::numpyToLogicalType(const NumpyType& col_type) { case NumpyNullableType::OBJECT: return LogicalType(LogicalTypeID::STRING); default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/tools/python_api/src_cpp/pandas/pandas_analyzer.cpp b/tools/python_api/src_cpp/pandas/pandas_analyzer.cpp index d3b7eaae2e..0b59be6b1f 100644 --- a/tools/python_api/src_cpp/pandas/pandas_analyzer.cpp +++ b/tools/python_api/src_cpp/pandas/pandas_analyzer.cpp @@ -177,7 +177,7 @@ common::LogicalType PandasAnalyzer::getItemType(py::object ele, bool& canConvert return dictToStruct(dict, canConvert); } default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/tools/python_api/src_cpp/pandas/pandas_bind.cpp b/tools/python_api/src_cpp/pandas/pandas_bind.cpp index bc2696f325..5746d0bd9b 100644 --- a/tools/python_api/src_cpp/pandas/pandas_bind.cpp +++ b/tools/python_api/src_cpp/pandas/pandas_bind.cpp @@ -26,7 +26,7 @@ struct PandasDataFrameBind { getter = df.attr("__getitem__"); } PandasBindColumn operator[](uint64_t index) const { - KU_ASSERT(index < names.size()); + RYU_ASSERT(index < names.size()); auto column = py::reinterpret_borrow(getter(names[index])); auto type = types[index]; auto name = names[index]; diff --git a/tools/python_api/src_cpp/pandas/pandas_scan.cpp b/tools/python_api/src_cpp/pandas/pandas_scan.cpp index 616d94e3cc..e609bf2716 100644 --- a/tools/python_api/src_cpp/pandas/pandas_scan.cpp +++ b/tools/python_api/src_cpp/pandas/pandas_scan.cpp @@ -28,7 +28,7 @@ std::unique_ptr bindFunc(ClientContext* /*context*/, std::vector returnTypes; std::vector names; if (py::isinstance(df)) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } else { Pandas::bind(df, columnBindData, returnTypes, names); } @@ -39,7 +39,7 @@ std::unique_ptr bindFunc(ClientContext* /*context*/, auto scanConfig = PyScanConfig{ input->extraInput->constPtrCast()->fileScanInfo.options, numRows}; - KU_ASSERT(numRows >= scanConfig.skipNum); + RYU_ASSERT(numRows >= scanConfig.skipNum); return std::make_unique(std::move(returnColumns), df, std::min(numRows - scanConfig.skipNum, scanConfig.limitNum), std::move(columnBindData), scanConfig); @@ -68,7 +68,7 @@ void pandasBackendScanSwitch(PandasColumnBindData* bindData, uint64_t count, uin NumpyScan::scan(bindData, count, offset, outputVector); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/tools/python_api/src_cpp/py_connection.cpp b/tools/python_api/src_cpp/py_connection.cpp index 8afda09de4..88a84f5d5d 100644 --- a/tools/python_api/src_cpp/py_connection.cpp +++ b/tools/python_api/src_cpp/py_connection.cpp @@ -222,7 +222,7 @@ void PyConnection::getAllEdgesForTorchGeometric(py::array_t& npArray, if (!result->isSuccess()) { throw std::runtime_error(result->getErrorMessage()); } - KU_ASSERT(result->getType() == QueryResultType::FTABLE); + RYU_ASSERT(result->getType() == QueryResultType::FTABLE); auto& table = result->constCast().getFactorizedTable(); auto tableSchema = table.getTableSchema(); if (tableSchema->getColumn(0)->isFlat() && !tableSchema->getColumn(1)->isFlat()) { @@ -680,7 +680,7 @@ Value PyConnection::transformPythonValueAs(const py::handle& val, const LogicalT } // LCOV_EXCL_START default: - KU_UNREACHABLE; + RYU_UNREACHABLE; // LCOV_EXCL_STOP } } diff --git a/tools/python_api/src_cpp/py_conversion.cpp b/tools/python_api/src_cpp/py_conversion.cpp index 9e5c63b5db..72c74a4034 100644 --- a/tools/python_api/src_cpp/py_conversion.cpp +++ b/tools/python_api/src_cpp/py_conversion.cpp @@ -80,7 +80,7 @@ static std::vector transformStructKeys(py::handle keys, idx_t size) void transformDictionaryToStruct(common::ValueVector* outputVector, uint64_t pos, const PyDictionary& dict) { - KU_ASSERT(outputVector->dataType.getLogicalTypeID() == LogicalTypeID::STRUCT); + RYU_ASSERT(outputVector->dataType.getLogicalTypeID() == LogicalTypeID::STRUCT); auto structKeys = transformStructKeys(dict.keys, dict.len); if (StructType::getNumFields(outputVector->dataType) != dict.len) { throw common::ConversionException( @@ -103,7 +103,7 @@ void transformDictionaryToStruct(common::ValueVector* outputVector, uint64_t pos void transformDictionaryToMap(common::ValueVector* outputVector, uint64_t pos, const PyDictionary& dict) { - KU_ASSERT(outputVector->dataType.getLogicalTypeID() == LogicalTypeID::MAP); + RYU_ASSERT(outputVector->dataType.getLogicalTypeID() == LogicalTypeID::MAP); auto keys = dict.values.attr("__getitem__")(0); auto values = dict.values.attr("__getitem__")(1); @@ -113,7 +113,7 @@ void transformDictionaryToMap(common::ValueVector* outputVector, uint64_t pos, } auto numKeys = py::len(keys); - KU_ASSERT(numKeys == py::len(values)); + RYU_ASSERT(numKeys == py::len(values)); auto listEntry = ListVector::addList(outputVector, numKeys); outputVector->setValue(pos, listEntry); auto structVector = ListVector::getDataVector(outputVector); @@ -202,11 +202,11 @@ void transformPythonValue(common::ValueVector* outputVector, uint64_t pos, py::h transformDictionaryToMap(outputVector, pos, dict); } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } break; default: - KU_UNREACHABLE; + RYU_UNREACHABLE; } } diff --git a/tools/python_api/src_cpp/py_query_result_converter.cpp b/tools/python_api/src_cpp/py_query_result_converter.cpp index e5b879d0ba..1c8e1032b6 100644 --- a/tools/python_api/src_cpp/py_query_result_converter.cpp +++ b/tools/python_api/src_cpp/py_query_result_converter.cpp @@ -103,7 +103,7 @@ void NPArrayWrapper::appendElement(Value* value) { ((py::dict*)dataBuffer)[numElements] = PyQueryResult::convertValueToPyObject(*value); } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } } @@ -182,7 +182,7 @@ py::dtype NPArrayWrapper::convertToArrayType(const LogicalType& type) { dtype = "object"; } break; default: { - KU_UNREACHABLE; + RYU_UNREACHABLE; } } return py::dtype(dtype); diff --git a/tools/python_api/src_cpp/pyarrow/pyarrow_scan.cpp b/tools/python_api/src_cpp/pyarrow/pyarrow_scan.cpp index 67134a0f33..fb9a4bfb9d 100644 --- a/tools/python_api/src_cpp/pyarrow/pyarrow_scan.cpp +++ b/tools/python_api/src_cpp/pyarrow/pyarrow_scan.cpp @@ -43,7 +43,7 @@ static std::unique_ptr bindFunc(ClientContext*, std::vector returnTypes; std::vector names; if (py::isinstance(table)) { - KU_UNREACHABLE; + RYU_UNREACHABLE; } auto numRows = py::len(table); auto schema = Pyarrow::bind(table, returnTypes, names); diff --git a/tools/rust_api/include/ryu_rs.h b/tools/rust_api/include/ryu_rs.h index 3c112d9fda..d759bac98c 100644 --- a/tools/rust_api/include/ryu_rs.h +++ b/tools/rust_api/include/ryu_rs.h @@ -218,7 +218,7 @@ inline std::unique_ptr create_value_decimal(int64_t high, ui [&](int64_t) { value->val.int64Val = static_cast(i128); }, [&](int32_t) { value->val.int32Val = static_cast(i128); }, [&](int16_t) { value->val.int16Val = static_cast(i128); }, - [](auto) { KU_UNREACHABLE; }); + [](auto) { RYU_UNREACHABLE; }); return value; } diff --git a/tools/shell/printer/json_printer.cpp b/tools/shell/printer/json_printer.cpp index 20fb68e37a..c5d0f93027 100644 --- a/tools/shell/printer/json_printer.cpp +++ b/tools/shell/printer/json_printer.cpp @@ -36,7 +36,7 @@ std::string JsonPrinter::printBody(QueryResult& queryResult, MemoryManager& mm) scanVectors.push_back(resultVector.get()); } std::span vectorsToScan{scanVectors}; - KU_ASSERT(queryResult.getType() == QueryResultType::FTABLE); + RYU_ASSERT(queryResult.getType() == QueryResultType::FTABLE); auto& table = queryResult.constCast().getFactorizedTable(); uint64_t numTuplesScanned = 0; auto maxNumTuplesToScanInBatch = table.hasUnflatCol() ? 1 : DEFAULT_VECTOR_CAPACITY; From 7b03cc72b2394dd250def0de8a3c86c7bc57124a Mon Sep 17 00:00:00 2001 From: Saksham Agrawal <40560369+saksham115@users.noreply.github.com> Date: Fri, 14 Nov 2025 23:34:54 +0530 Subject: [PATCH 2/4] Update .lcovrc --- .lcovrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lcovrc b/.lcovrc index 06978baa18..0abbd326ba 100644 --- a/.lcovrc +++ b/.lcovrc @@ -1,4 +1,4 @@ -lcov_excl_line = LCOV_EXCL_LINE|KU_UNREACHABLE +lcov_excl_line = LCOV_EXCL_LINE|RYU_UNREACHABLE geninfo_gcov_tool = gcov-13 # Ignore errors that occur due to stricter validation in newer gcov versions (Ubuntu 24.04) From eebf2e523af05a71645ed524b8f722b4ddc6d8b5 Mon Sep 17 00:00:00 2001 From: Saksham Agrawal <40560369+saksham115@users.noreply.github.com> Date: Mon, 8 Dec 2025 13:46:23 +0530 Subject: [PATCH 3/4] formatting code --- .../src/connector/duckdb_result_converter.cpp | 2 +- extension/httpfs/src/httpfs.cpp | 2 +- .../scalar_functions/json_contains.cpp | 4 ++-- .../vector/src/function/query_hnsw_index.cpp | 2 +- .../vector/src/include/index/hnsw_graph.h | 2 +- extension/vector/src/index/hnsw_graph.cpp | 2 +- extension/vector/src/index/hnsw_index.cpp | 6 +++--- .../vector/src/index/hnsw_rel_batch_insert.cpp | 2 +- src/catalog/catalog_set.cpp | 2 +- src/common/file_system/gzip_file_system.cpp | 4 ++-- src/common/file_system/local_file_system.cpp | 2 +- src/common/types/date_t.cpp | 2 +- src/common/types/types.cpp | 2 +- .../function_evaluator.cpp | 2 +- src/function/function_collection.cpp | 15 +++++++-------- src/function/vector_boolean_functions.cpp | 4 ++-- src/graph/on_disk_graph.cpp | 3 ++- src/include/common/assert.h | 2 +- src/include/common/data_chunk/data_chunk.h | 2 +- src/include/common/exception/binder.h | 2 +- src/include/common/exception/buffer_manager.h | 2 +- src/include/common/exception/catalog.h | 2 +- src/include/common/exception/checkpoint.h | 2 +- src/include/common/exception/connection.h | 2 +- src/include/common/exception/copy.h | 2 +- src/include/common/exception/internal.h | 2 +- src/include/common/exception/interrupt.h | 2 +- src/include/common/exception/not_implemented.h | 2 +- src/include/common/exception/parser.h | 2 +- src/include/common/exception/runtime.h | 2 +- src/include/common/exception/storage.h | 2 +- src/include/common/exception/test.h | 2 +- .../common/exception/transaction_manager.h | 2 +- src/include/common/static_vector.h | 2 +- src/include/common/types/value/value.h | 4 ++-- .../boolean/boolean_function_executor.h | 6 +++--- .../function/path/path_function_executor.h | 12 ++++++------ .../optimizer/projection_push_down_optimizer.h | 2 +- .../reader/parquet/boolean_column_reader.h | 2 +- .../reader/parquet/callback_column_reader.h | 4 ++-- .../reader/parquet/interval_column_reader.h | 2 +- .../reader/parquet/templated_column_reader.h | 2 +- .../persistent/reader/parquet/thrift_tools.h | 4 ++-- .../reader/parquet/uuid_column_reader.h | 2 +- src/include/storage/index/hash_index.h | 2 +- src/include/storage/index/in_mem_hash_index.h | 2 +- src/include/storage/page_range.h | 2 +- src/include/storage/table/column_chunk.h | 3 ++- .../storage/table/column_chunk_scanner.h | 2 +- .../storage/table/lazy_segment_scanner.h | 2 +- src/main/db_config.cpp | 2 +- .../join_order/join_tree_constructor.cpp | 2 +- src/processor/map/map_expressions_scan.cpp | 3 ++- src/processor/map/map_recursive_extend.cpp | 2 +- .../operator/hash_join/hash_join_probe.cpp | 2 +- .../operator/order_by/key_block_merger.cpp | 2 +- src/processor/operator/partitioner.cpp | 2 +- .../persistent/copy_rel_batch_insert.cpp | 2 +- .../persistent/reader/copy_from_error.cpp | 2 +- .../persistent/reader/csv/base_csv_reader.cpp | 2 +- src/storage/compression/compression.cpp | 12 ++++++------ src/storage/compression/float_compression.cpp | 14 +++++++------- src/storage/disk_array.cpp | 2 +- src/storage/free_space_manager.cpp | 3 ++- src/storage/index/hash_index.cpp | 2 +- src/storage/index/in_mem_hash_index.cpp | 4 ++-- src/storage/table/chunked_node_group.cpp | 2 +- src/storage/table/column_chunk_data.cpp | 12 ++++++------ src/storage/table/column_reader_writer.cpp | 12 ++++++------ src/storage/table/csr_node_group.cpp | 10 +++++----- src/storage/table/dictionary_chunk.cpp | 2 +- src/storage/table/dictionary_column.cpp | 2 +- src/storage/table/list_chunk_data.cpp | 8 ++++---- src/storage/table/list_column.cpp | 8 ++++---- src/storage/table/node_group.cpp | 4 ++-- src/storage/table/node_table.cpp | 2 +- src/storage/table/rel_table.cpp | 2 +- src/storage/table/rel_table_data.cpp | 4 ++-- src/storage/table/string_chunk_data.cpp | 4 ++-- src/storage/table/string_column.cpp | 4 ++-- src/storage/table/struct_chunk_data.cpp | 2 +- src/storage/table/update_info.cpp | 6 +++--- src/storage/table/version_info.cpp | 8 ++++---- src/storage/wal/wal_replayer.cpp | 18 +++++++++--------- tools/shell/include/printer/printer.h | 2 +- 85 files changed, 159 insertions(+), 156 deletions(-) diff --git a/extension/duckdb/src/connector/duckdb_result_converter.cpp b/extension/duckdb/src/connector/duckdb_result_converter.cpp index af2939b0ac..c54c7c6fb9 100644 --- a/extension/duckdb/src/connector/duckdb_result_converter.cpp +++ b/extension/duckdb/src/connector/duckdb_result_converter.cpp @@ -124,7 +124,7 @@ void DuckDBResultConverter::convertDuckDBResultToVector(duckdb::DataChunk& duckD continue; } RYU_ASSERT(duckDBResult.data[duckdbResultColIdx].GetVectorType() == - duckdb::VectorType::FLAT_VECTOR); + duckdb::VectorType::FLAT_VECTOR); conversionFunctions[i](duckDBResult.data[duckdbResultColIdx], result.getValueVectorMutable(i), result.state->getSelVector().getSelSize()); duckdbResultColIdx++; diff --git a/extension/httpfs/src/httpfs.cpp b/extension/httpfs/src/httpfs.cpp index 2f72f52e2f..5cd07239cc 100644 --- a/extension/httpfs/src/httpfs.cpp +++ b/extension/httpfs/src/httpfs.cpp @@ -191,7 +191,7 @@ void HTTPFileSystem::readFromFile(common::FileInfo& fileInfo, void* buffer, uint auto buffer_read_len = std::min(httpFileInfo.availableBuffer, numBytesToRead); if (buffer_read_len > 0) { RYU_ASSERT(httpFileInfo.bufferStartPos + httpFileInfo.bufferIdx + buffer_read_len <= - httpFileInfo.bufferEndPos); + httpFileInfo.bufferEndPos); memcpy((char*)buffer + bufferOffset, httpFileInfo.readBuffer.get() + httpFileInfo.bufferIdx, buffer_read_len); diff --git a/extension/json/src/functions/scalar_functions/json_contains.cpp b/extension/json/src/functions/scalar_functions/json_contains.cpp index 312895193c..ef2257bc03 100644 --- a/extension/json/src/functions/scalar_functions/json_contains.cpp +++ b/extension/json/src/functions/scalar_functions/json_contains.cpp @@ -13,7 +13,7 @@ static bool jsonFuzzyEquals(yyjson_val* haystack, yyjson_val* needle); static bool jsonArrayFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { RYU_ASSERT(yyjson_get_tag(haystack) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE) && - yyjson_get_tag(needle) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE)); + yyjson_get_tag(needle) == (YYJSON_TYPE_ARR | YYJSON_SUBTYPE_NONE)); size_t needleIdx = 0, needleMax = 0, haystackIdx = 0, haystackMax = 0; yyjson_val *needleChild = nullptr, *haystackChild = nullptr; @@ -34,7 +34,7 @@ static bool jsonArrayFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { static bool JSONObjectFuzzyEquals(yyjson_val* haystack, yyjson_val* needle) { RYU_ASSERT(yyjson_get_tag(haystack) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE) && - yyjson_get_tag(needle) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE)); + yyjson_get_tag(needle) == (YYJSON_TYPE_OBJ | YYJSON_SUBTYPE_NONE)); size_t idx = 0, max = 0; yyjson_val *key = nullptr, *needleChild = nullptr; diff --git a/extension/vector/src/function/query_hnsw_index.cpp b/extension/vector/src/function/query_hnsw_index.cpp index 264a3810e0..c7542da6c0 100644 --- a/extension/vector/src/function/query_hnsw_index.cpp +++ b/extension/vector/src/function/query_hnsw_index.cpp @@ -153,7 +153,7 @@ static std::unique_ptr bindFunc(main::ClientContext* context, RYU_ASSERT(indexEntry->getPropertyIDs().size() == 1); auto propertyID = indexEntry->getPropertyIDs()[0]; RYU_ASSERT(nodeTableEntry->getProperty(propertyID).getType().getLogicalTypeID() == - LogicalTypeID::ARRAY); + LogicalTypeID::ARRAY); bindData->indexColumnID = nodeTableEntry->getColumnID(propertyID); bindData->queryExpression = input->params[2]; bindData->kExpression = input->params[3]; diff --git a/extension/vector/src/include/index/hnsw_graph.h b/extension/vector/src/include/index/hnsw_graph.h index 8e94043f5f..85eaf56630 100644 --- a/extension/vector/src/include/index/hnsw_graph.h +++ b/extension/vector/src/include/index/hnsw_graph.h @@ -225,7 +225,7 @@ class CompressedNodeOffsetBuffer { struct NodeToHNSWGraphOffsetMap { explicit NodeToHNSWGraphOffsetMap(common::offset_t numNodesInTable) - : numNodesInGraph(numNodesInTable), numNodesInTable(numNodesInTable){}; + : numNodesInGraph(numNodesInTable), numNodesInTable(numNodesInTable) {}; NodeToHNSWGraphOffsetMap(common::offset_t numNodesInTable, const common::NullMask* selectedNodes); diff --git a/extension/vector/src/index/hnsw_graph.cpp b/extension/vector/src/index/hnsw_graph.cpp index f8ca42d18f..5df56b3116 100644 --- a/extension/vector/src/index/hnsw_graph.cpp +++ b/extension/vector/src/index/hnsw_graph.cpp @@ -147,7 +147,7 @@ EmbeddingHandle OnDiskEmbeddings::getEmbedding(common::offset_t offset, } const auto result = nodeTable.lookup(transaction, scanState); RYU_ASSERT(scanState.outputVectors.size() == 1 && - scanState.outputVectors[0]->state->getSelVector()[0] == 0); + scanState.outputVectors[0]->state->getSelVector()[0] == 0); if (!result || scanState.outputVectors[0]->isNull(0)) { return EmbeddingHandle::createNullHandle(); } diff --git a/extension/vector/src/index/hnsw_index.cpp b/extension/vector/src/index/hnsw_index.cpp index b5200e5117..0723b05a75 100644 --- a/extension/vector/src/index/hnsw_index.cpp +++ b/extension/vector/src/index/hnsw_index.cpp @@ -244,8 +244,8 @@ void InMemHNSWLayer::finalizeNodeGroup(common::node_group_idx_t nodeGroupIdx, const auto endNodeInGraph = selectedNodesMap.nodeToGraphOffset(endNodeOffset, false); for (auto offsetInGraph = startNodeInGraph; offsetInGraph < endNodeInGraph; offsetInGraph++) { RYU_ASSERT(offsetInGraph < selectedNodesMap.getNumNodesInGraph() && - selectedNodesMap.graphToNodeOffset(offsetInGraph) >= startNodeInGraph && - selectedNodesMap.graphToNodeOffset(offsetInGraph) < endNodeOffset); + selectedNodesMap.graphToNodeOffset(offsetInGraph) >= startNodeInGraph && + selectedNodesMap.graphToNodeOffset(offsetInGraph) < endNodeOffset); const auto numNbrs = graph->getCSRLength(offsetInGraph); if (numNbrs <= info.maxDegree) { continue; @@ -460,7 +460,7 @@ OnDiskHNSWIndex::OnDiskHNSWIndex(const main::ClientContext* context, IndexInfo i nodeTable{StorageManager::Get(*context)->getTable(indexInfo.tableID)->cast()} { RYU_ASSERT(this->indexInfo.columnIDs.size() == 1); RYU_ASSERT(nodeTable.getColumn(this->indexInfo.columnIDs[0]).getDataType().getLogicalTypeID() == - common::LogicalTypeID::ARRAY); + common::LogicalTypeID::ARRAY); const auto storageManager = StorageManager::Get(*context); const auto& hnswStorageInfo = this->storageInfo->cast(); lowerRelTable = storageManager->getTable(hnswStorageInfo.lowerRelTableID)->ptrCast(); diff --git a/extension/vector/src/index/hnsw_rel_batch_insert.cpp b/extension/vector/src/index/hnsw_rel_batch_insert.cpp index 544a138595..d51f5b08db 100644 --- a/extension/vector/src/index/hnsw_rel_batch_insert.cpp +++ b/extension/vector/src/index/hnsw_rel_batch_insert.cpp @@ -71,7 +71,7 @@ void HNSWRelBatchInsert::populateCSRLengths(processor::RelBatchInsertExecutionSt storage::InMemChunkedCSRHeader& csrHeader, common::offset_t numNodes, const processor::RelBatchInsertInfo&) { RYU_ASSERT(numNodes == csrHeader.length->getNumValues() && - numNodes == csrHeader.offset->getNumValues()); + numNodes == csrHeader.offset->getNumValues()); const auto& hnswExecutionState = executionState.constCast(); const auto& graph = hnswExecutionState.graph; const auto startNodeInGraph = hnswExecutionState.startNodeInGraph; diff --git a/src/catalog/catalog_set.cpp b/src/catalog/catalog_set.cpp index 866ccb8452..4412968109 100644 --- a/src/catalog/catalog_set.cpp +++ b/src/catalog/catalog_set.cpp @@ -176,7 +176,7 @@ void CatalogSet::alterTableEntry(Transaction* transaction, // LCOV_EXCL_STOP auto entry = getEntryNoLock(transaction, alterInfo.tableName); RYU_ASSERT(entry->getType() == CatalogEntryType::NODE_TABLE_ENTRY || - entry->getType() == CatalogEntryType::REL_GROUP_ENTRY); + entry->getType() == CatalogEntryType::REL_GROUP_ENTRY); const auto tableEntry = entry->ptrCast(); auto newEntry = tableEntry->alter(transaction->getID(), alterInfo, this); switch (alterInfo.alterType) { diff --git a/src/common/file_system/gzip_file_system.cpp b/src/common/file_system/gzip_file_system.cpp index 4d16405fa2..a92c1c70c5 100644 --- a/src/common/file_system/gzip_file_system.cpp +++ b/src/common/file_system/gzip_file_system.cpp @@ -102,8 +102,8 @@ bool MiniZStreamWrapper::read(StreamData& sd) { auto xlen = (uint8_t)*bodyPtr | (uint8_t) * (bodyPtr + 1) << 8; bodyPtr += xlen + 2; RYU_ASSERT((common::idx_t)(GZipFileSystem::GZIP_FOOTER_SIZE + - GZipFileSystem::GZIP_HEADER_MINSIZE + 2 + xlen) < - GZipFileSystem::GZIP_HEADER_MAXSIZE); + GZipFileSystem::GZIP_HEADER_MINSIZE + 2 + xlen) < + GZipFileSystem::GZIP_HEADER_MAXSIZE); } if (gzipHdr[3] & GZipFileSystem::GZIP_FLAG_NAME) { char c = '\0'; diff --git a/src/common/file_system/local_file_system.cpp b/src/common/file_system/local_file_system.cpp index 32f7bc256a..ff9a776ef2 100644 --- a/src/common/file_system/local_file_system.cpp +++ b/src/common/file_system/local_file_system.cpp @@ -52,7 +52,7 @@ static void validateFileFlags(uint8_t flags) { RYU_ASSERT(isWrite || !(flags & FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS)); // CREATE_IF_NOT_EXISTS and CREATE_AND_TRUNCATE_IF_EXISTS flags cannot be combined. RYU_ASSERT(!(flags & FileFlags::CREATE_IF_NOT_EXISTS && - flags & FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS)); + flags & FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS)); } std::unique_ptr LocalFileSystem::openFile(const std::string& path, FileOpenFlags flags, diff --git a/src/common/types/date_t.cpp b/src/common/types/date_t.cpp index ec0bac6483..3046c5b3ee 100644 --- a/src/common/types/date_t.cpp +++ b/src/common/types/date_t.cpp @@ -224,7 +224,7 @@ void Date::convert(date_t date, int32_t& out_year, int32_t& out_month, int32_t& } out_day++; RYU_ASSERT(out_day > 0 && out_day <= (is_leap_year ? Date::LEAP_DAYS[out_month] : - Date::NORMAL_DAYS[out_month])); + Date::NORMAL_DAYS[out_month])); RYU_ASSERT(out_month > 0 && out_month <= 12); RYU_ASSERT(Date::isValid(out_year, out_month, out_day)); } diff --git a/src/common/types/types.cpp b/src/common/types/types.cpp index 96934df50c..0d3deaa2c5 100644 --- a/src/common/types/types.cpp +++ b/src/common/types/types.cpp @@ -113,7 +113,7 @@ uint32_t DecimalType::getScale(const LogicalType& type) { const LogicalType& ListType::getChildType(const ryu::common::LogicalType& type) { RYU_ASSERT(type.getPhysicalType() == PhysicalTypeID::LIST || - type.getPhysicalType() == PhysicalTypeID::ARRAY); + type.getPhysicalType() == PhysicalTypeID::ARRAY); auto listTypeInfo = type.extraTypeInfo->constPtrCast(); return listTypeInfo->getChildType(); } diff --git a/src/expression_evaluator/function_evaluator.cpp b/src/expression_evaluator/function_evaluator.cpp index a2f82a0f6c..7880e8d69a 100644 --- a/src/expression_evaluator/function_evaluator.cpp +++ b/src/expression_evaluator/function_evaluator.cpp @@ -34,7 +34,7 @@ void FunctionExpressionEvaluator::evaluate() { void FunctionExpressionEvaluator::evaluate(common::sel_t count) { RYU_ASSERT(expression->constCast().getFunction().name == - NextValFunction::name); + NextValFunction::name); for (auto& child : children) { child->evaluate(count); } diff --git a/src/function/function_collection.cpp b/src/function/function_collection.cpp index 3a64d0e518..5567641914 100644 --- a/src/function/function_collection.cpp +++ b/src/function/function_collection.cpp @@ -36,23 +36,22 @@ namespace ryu { namespace function { #define SCALAR_FUNCTION_BASE(_PARAM, _NAME) \ - { _PARAM::getFunctionSet, _NAME, CatalogEntryType::SCALAR_FUNCTION_ENTRY } + {_PARAM::getFunctionSet, _NAME, CatalogEntryType::SCALAR_FUNCTION_ENTRY} #define SCALAR_FUNCTION(_PARAM) SCALAR_FUNCTION_BASE(_PARAM, _PARAM::name) #define SCALAR_FUNCTION_ALIAS(_PARAM) SCALAR_FUNCTION_BASE(_PARAM::alias, _PARAM::name) #define REWRITE_FUNCTION_BASE(_PARAM, _NAME) \ - { _PARAM::getFunctionSet, _NAME, CatalogEntryType::REWRITE_FUNCTION_ENTRY } + {_PARAM::getFunctionSet, _NAME, CatalogEntryType::REWRITE_FUNCTION_ENTRY} #define REWRITE_FUNCTION(_PARAM) REWRITE_FUNCTION_BASE(_PARAM, _PARAM::name) #define REWRITE_FUNCTION_ALIAS(_PARAM) REWRITE_FUNCTION_BASE(_PARAM::alias, _PARAM::name) #define AGGREGATE_FUNCTION(_PARAM) \ - { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::AGGREGATE_FUNCTION_ENTRY } + {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::AGGREGATE_FUNCTION_ENTRY} #define EXPORT_FUNCTION(_PARAM) \ - { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::COPY_FUNCTION_ENTRY } + {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::COPY_FUNCTION_ENTRY} #define TABLE_FUNCTION(_PARAM) \ - { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::TABLE_FUNCTION_ENTRY } + {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::TABLE_FUNCTION_ENTRY} #define STANDALONE_TABLE_FUNCTION(_PARAM) \ - { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::STANDALONE_TABLE_FUNCTION_ENTRY } -#define FINAL_FUNCTION \ - { nullptr, nullptr, CatalogEntryType::SCALAR_FUNCTION_ENTRY } + {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::STANDALONE_TABLE_FUNCTION_ENTRY} +#define FINAL_FUNCTION {nullptr, nullptr, CatalogEntryType::SCALAR_FUNCTION_ENTRY} FunctionCollection* FunctionCollection::getFunctions() { static FunctionCollection functions[] = { diff --git a/src/function/vector_boolean_functions.cpp b/src/function/vector_boolean_functions.cpp index 7e7a8758b8..c3c8a4e1aa 100644 --- a/src/function/vector_boolean_functions.cpp +++ b/src/function/vector_boolean_functions.cpp @@ -36,7 +36,7 @@ void VectorBooleanFunction::bindBinaryExecFunction(ExpressionType expressionType (void)leftType; (void)rightType; RYU_ASSERT(leftType.getLogicalTypeID() == LogicalTypeID::BOOL && - rightType.getLogicalTypeID() == LogicalTypeID::BOOL); + rightType.getLogicalTypeID() == LogicalTypeID::BOOL); switch (expressionType) { case ExpressionType::AND: { func = &BinaryBooleanExecFunction; @@ -65,7 +65,7 @@ void VectorBooleanFunction::bindBinarySelectFunction(ExpressionType expressionTy (void)leftType; (void)rightType; RYU_ASSERT(leftType.getLogicalTypeID() == LogicalTypeID::BOOL && - rightType.getLogicalTypeID() == LogicalTypeID::BOOL); + rightType.getLogicalTypeID() == LogicalTypeID::BOOL); switch (expressionType) { case ExpressionType::AND: { func = &BinaryBooleanSelectFunction; diff --git a/src/graph/on_disk_graph.cpp b/src/graph/on_disk_graph.cpp index a805e982ad..1cd9527e3a 100644 --- a/src/graph/on_disk_graph.cpp +++ b/src/graph/on_disk_graph.cpp @@ -275,7 +275,8 @@ void OnDiskGraphNbrScanState::InnerIterator::initScan() const { void OnDiskGraphNbrScanState::startScan(RelDataDirection direction) { auto idx = RelDirectionUtils::relDirectionToKeyIdx(direction); - RYU_ASSERT(idx < directedIterators.size() && directedIterators[idx].getDirection() == direction); + RYU_ASSERT( + idx < directedIterators.size() && directedIterators[idx].getDirection() == direction); currentIter = &directedIterators[idx]; currentIter->initScan(); } diff --git a/src/include/common/assert.h b/src/include/common/assert.h index 8aa9a72172..51ceba12c7 100644 --- a/src/include/common/assert.h +++ b/src/include/common/assert.h @@ -28,7 +28,7 @@ namespace common { #endif #define RYU_UNREACHABLE \ - /* LCOV_EXCL_START */ [[unlikely]] ryu::common::ryuAssertFailureInternal("RYU_UNREACHABLE", \ + /* LCOV_EXCL_START */ [[unlikely]] ryu::common::ryuAssertFailureInternal("RYU_UNREACHABLE", \ __FILE__, __LINE__) /* LCOV_EXCL_STOP */ #define RYU_UNUSED(expr) (void)(expr) diff --git a/src/include/common/data_chunk/data_chunk.h b/src/include/common/data_chunk/data_chunk.h index 34ca1bec03..205400df86 100644 --- a/src/include/common/data_chunk/data_chunk.h +++ b/src/include/common/data_chunk/data_chunk.h @@ -21,7 +21,7 @@ class RYU_API DataChunk { public: DataChunk() : DataChunk{0} {} explicit DataChunk(uint32_t numValueVectors) - : DataChunk(numValueVectors, std::make_shared()){}; + : DataChunk(numValueVectors, std::make_shared()) {}; DataChunk(uint32_t numValueVectors, const std::shared_ptr& state) : valueVectors(numValueVectors), state{state} {}; diff --git a/src/include/common/exception/binder.h b/src/include/common/exception/binder.h index 92b6a7c84e..e01fb8bb52 100644 --- a/src/include/common/exception/binder.h +++ b/src/include/common/exception/binder.h @@ -8,7 +8,7 @@ namespace common { class RYU_API BinderException : public Exception { public: - explicit BinderException(const std::string& msg) : Exception("Binder exception: " + msg){}; + explicit BinderException(const std::string& msg) : Exception("Binder exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/buffer_manager.h b/src/include/common/exception/buffer_manager.h index 7c8d21ee79..243cf23f62 100644 --- a/src/include/common/exception/buffer_manager.h +++ b/src/include/common/exception/buffer_manager.h @@ -9,7 +9,7 @@ namespace common { class RYU_API BufferManagerException : public Exception { public: explicit BufferManagerException(const std::string& msg) - : Exception("Buffer manager exception: " + msg){}; + : Exception("Buffer manager exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/catalog.h b/src/include/common/exception/catalog.h index 6e5d4d8873..d0954db93f 100644 --- a/src/include/common/exception/catalog.h +++ b/src/include/common/exception/catalog.h @@ -8,7 +8,7 @@ namespace common { class RYU_API CatalogException : public Exception { public: - explicit CatalogException(const std::string& msg) : Exception("Catalog exception: " + msg){}; + explicit CatalogException(const std::string& msg) : Exception("Catalog exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/checkpoint.h b/src/include/common/exception/checkpoint.h index 24d3e2e09a..a902b5e076 100644 --- a/src/include/common/exception/checkpoint.h +++ b/src/include/common/exception/checkpoint.h @@ -8,7 +8,7 @@ namespace common { class RYU_API CheckpointException : public Exception { public: - explicit CheckpointException(const std::exception& e) : Exception(e.what()){}; + explicit CheckpointException(const std::exception& e) : Exception(e.what()) {}; }; } // namespace common diff --git a/src/include/common/exception/connection.h b/src/include/common/exception/connection.h index 66f97b77b0..14db98c950 100644 --- a/src/include/common/exception/connection.h +++ b/src/include/common/exception/connection.h @@ -9,7 +9,7 @@ namespace common { class RYU_API ConnectionException : public Exception { public: explicit ConnectionException(const std::string& msg) - : Exception("Connection exception: " + msg){}; + : Exception("Connection exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/copy.h b/src/include/common/exception/copy.h index 14f24fb90c..bf7247816c 100644 --- a/src/include/common/exception/copy.h +++ b/src/include/common/exception/copy.h @@ -8,7 +8,7 @@ namespace common { class RYU_API CopyException : public Exception { public: - explicit CopyException(const std::string& msg) : Exception("Copy exception: " + msg){}; + explicit CopyException(const std::string& msg) : Exception("Copy exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/internal.h b/src/include/common/exception/internal.h index 1d33d58c7e..a830108f9e 100644 --- a/src/include/common/exception/internal.h +++ b/src/include/common/exception/internal.h @@ -8,7 +8,7 @@ namespace common { class RYU_API InternalException : public Exception { public: - explicit InternalException(const std::string& msg) : Exception(msg){}; + explicit InternalException(const std::string& msg) : Exception(msg) {}; }; } // namespace common diff --git a/src/include/common/exception/interrupt.h b/src/include/common/exception/interrupt.h index 7ae43a83f1..d37c8d3cc3 100644 --- a/src/include/common/exception/interrupt.h +++ b/src/include/common/exception/interrupt.h @@ -8,7 +8,7 @@ namespace common { class RYU_API InterruptException : public Exception { public: - explicit InterruptException() : Exception("Interrupted."){}; + explicit InterruptException() : Exception("Interrupted.") {}; }; } // namespace common diff --git a/src/include/common/exception/not_implemented.h b/src/include/common/exception/not_implemented.h index 3f0d99468c..dbb822f0d2 100644 --- a/src/include/common/exception/not_implemented.h +++ b/src/include/common/exception/not_implemented.h @@ -8,7 +8,7 @@ namespace common { class RYU_API NotImplementedException : public Exception { public: - explicit NotImplementedException(const std::string& msg) : Exception(msg){}; + explicit NotImplementedException(const std::string& msg) : Exception(msg) {}; }; } // namespace common diff --git a/src/include/common/exception/parser.h b/src/include/common/exception/parser.h index 9578488ec3..198b387d7f 100644 --- a/src/include/common/exception/parser.h +++ b/src/include/common/exception/parser.h @@ -10,7 +10,7 @@ class RYU_API ParserException : public Exception { public: static constexpr const char* ERROR_PREFIX = "Parser exception: "; - explicit ParserException(const std::string& msg) : Exception(ERROR_PREFIX + msg){}; + explicit ParserException(const std::string& msg) : Exception(ERROR_PREFIX + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/runtime.h b/src/include/common/exception/runtime.h index e516621dd8..7110bd5367 100644 --- a/src/include/common/exception/runtime.h +++ b/src/include/common/exception/runtime.h @@ -8,7 +8,7 @@ namespace common { class RYU_API RuntimeException : public Exception { public: - explicit RuntimeException(const std::string& msg) : Exception("Runtime exception: " + msg){}; + explicit RuntimeException(const std::string& msg) : Exception("Runtime exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/storage.h b/src/include/common/exception/storage.h index bb2be91f2b..662fa5d17f 100644 --- a/src/include/common/exception/storage.h +++ b/src/include/common/exception/storage.h @@ -8,7 +8,7 @@ namespace common { class RYU_API StorageException : public Exception { public: - explicit StorageException(const std::string& msg) : Exception("Storage exception: " + msg){}; + explicit StorageException(const std::string& msg) : Exception("Storage exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/test.h b/src/include/common/exception/test.h index 2484ab6196..1726e36891 100644 --- a/src/include/common/exception/test.h +++ b/src/include/common/exception/test.h @@ -7,7 +7,7 @@ namespace common { class TestException : public Exception { public: - explicit TestException(const std::string& msg) : Exception("Test exception: " + msg){}; + explicit TestException(const std::string& msg) : Exception("Test exception: " + msg) {}; }; } // namespace common diff --git a/src/include/common/exception/transaction_manager.h b/src/include/common/exception/transaction_manager.h index 725f74afe4..6d2bc0a853 100644 --- a/src/include/common/exception/transaction_manager.h +++ b/src/include/common/exception/transaction_manager.h @@ -8,7 +8,7 @@ namespace common { class RYU_API TransactionManagerException : public Exception { public: - explicit TransactionManagerException(const std::string& msg) : Exception(msg){}; + explicit TransactionManagerException(const std::string& msg) : Exception(msg) {}; }; } // namespace common diff --git a/src/include/common/static_vector.h b/src/include/common/static_vector.h index a38aa3016c..7c58e48bb6 100644 --- a/src/include/common/static_vector.h +++ b/src/include/common/static_vector.h @@ -29,7 +29,7 @@ class StaticVector { } public: - StaticVector() : len(0){}; + StaticVector() : len(0) {}; StaticVector(StaticVector&& other) : len(other.len) { std::uninitialized_move(other.begin(), other.end(), begin()); other.len = 0; diff --git a/src/include/common/types/value/value.h b/src/include/common/types/value/value.h index ab2cb7d9ab..eea0f4fec7 100644 --- a/src/include/common/types/value/value.h +++ b/src/include/common/types/value/value.h @@ -498,8 +498,8 @@ RYU_API inline uint128_t Value::getValue() const { template<> RYU_API inline std::string Value::getValue() const { RYU_ASSERT(dataType.getLogicalTypeID() == LogicalTypeID::STRING || - dataType.getLogicalTypeID() == LogicalTypeID::BLOB || - dataType.getLogicalTypeID() == LogicalTypeID::UUID); + dataType.getLogicalTypeID() == LogicalTypeID::BLOB || + dataType.getLogicalTypeID() == LogicalTypeID::UUID); return strVal; } diff --git a/src/include/function/boolean/boolean_function_executor.h b/src/include/function/boolean/boolean_function_executor.h index 2e1d52b9af..db400b5273 100644 --- a/src/include/function/boolean/boolean_function_executor.h +++ b/src/include/function/boolean/boolean_function_executor.h @@ -137,8 +137,8 @@ struct BinaryBooleanFunctionExecutor { common::ValueVector& right, common::SelectionVector* rightSelVector, common::ValueVector& result, common::SelectionVector* resultSelVector) { RYU_ASSERT(left.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && - right.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && - result.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); + right.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && + result.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); if (left.state->isFlat() && right.state->isFlat()) { executeBothFlat(left, leftSelVector, right, rightSelVector, result, resultSelVector); @@ -247,7 +247,7 @@ struct BinaryBooleanFunctionExecutor { static bool select(common::ValueVector& left, common::ValueVector& right, common::SelectionVector& selVector) { RYU_ASSERT(left.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL && - right.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); + right.dataType.getLogicalTypeID() == common::LogicalTypeID::BOOL); if (left.state->isFlat() && right.state->isFlat()) { return selectBothFlat(left, right); } else if (left.state->isFlat() && !right.state->isFlat()) { diff --git a/src/include/function/path/path_function_executor.h b/src/include/function/path/path_function_executor.h index b0f61f733d..73d7505616 100644 --- a/src/include/function/path/path_function_executor.h +++ b/src/include/function/path/path_function_executor.h @@ -29,7 +29,7 @@ struct UnaryPathExecutor { common::ValueVector& result) { auto nodesFieldIdx = 0; RYU_ASSERT(nodesFieldIdx == - common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::NODES)); + common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::NODES)); auto nodesVector = common::StructVector::getFieldVector(&input, nodesFieldIdx).get(); auto internalIDFieldIdx = 0; execute(inputSelVector, *nodesVector, internalIDFieldIdx, result); @@ -39,7 +39,7 @@ struct UnaryPathExecutor { common::ValueVector& result) { auto relsFieldIdx = 1; RYU_ASSERT(relsFieldIdx == - common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::RELS)); + common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::RELS)); auto relsVector = common::StructVector::getFieldVector(&input, relsFieldIdx).get(); auto internalIDFieldIdx = 3; execute(inputSelVector, *relsVector, internalIDFieldIdx, result); @@ -49,7 +49,7 @@ struct UnaryPathExecutor { common::SelectionVector& selectionVector) { auto nodesFieldIdx = 0; RYU_ASSERT(nodesFieldIdx == - common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::NODES)); + common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::NODES)); auto nodesVector = common::StructVector::getFieldVector(&input, nodesFieldIdx).get(); auto internalIDFieldIdx = 0; return select(input.state->getSelVector(), *nodesVector, internalIDFieldIdx, @@ -59,7 +59,7 @@ struct UnaryPathExecutor { static bool selectRelIDs(common::ValueVector& input, common::SelectionVector& selectionVector) { auto relsFieldIdx = 1; RYU_ASSERT(relsFieldIdx == - common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::RELS)); + common::StructType::getFieldIdx(input.dataType, common::InternalKeyword::RELS)); auto relsVector = common::StructVector::getFieldVector(&input, relsFieldIdx).get(); auto internalIDFieldIdx = 3; return select(input.state->getSelVector(), *relsVector, internalIDFieldIdx, @@ -72,7 +72,7 @@ struct UnaryPathExecutor { common::ValueVector& result) { auto listDataVector = common::ListVector::getDataVector(&listVector); RYU_ASSERT(fieldIdx == common::StructType::getFieldIdx(listDataVector->dataType, - common::InternalKeyword::ID)); + common::InternalKeyword::ID)); auto internalIDsVector = common::StructVector::getFieldVector(listDataVector, fieldIdx).get(); std::unordered_set internalIDSet; @@ -99,7 +99,7 @@ struct UnaryPathExecutor { common::SelectionVector& selectionVector) { auto listDataVector = common::ListVector::getDataVector(&listVector); RYU_ASSERT(fieldIdx == common::StructType::getFieldIdx(listDataVector->dataType, - common::InternalKeyword::ID)); + common::InternalKeyword::ID)); auto internalIDsVector = common::StructVector::getFieldVector(listDataVector, fieldIdx).get(); std::unordered_set internalIDSet; diff --git a/src/include/optimizer/projection_push_down_optimizer.h b/src/include/optimizer/projection_push_down_optimizer.h index 58d4a7e011..0500642e47 100644 --- a/src/include/optimizer/projection_push_down_optimizer.h +++ b/src/include/optimizer/projection_push_down_optimizer.h @@ -25,7 +25,7 @@ namespace optimizer { class ProjectionPushDownOptimizer : public LogicalOperatorVisitor { public: void rewrite(planner::LogicalPlan* plan); - explicit ProjectionPushDownOptimizer(common::PathSemantic semantic) : semantic(semantic){}; + explicit ProjectionPushDownOptimizer(common::PathSemantic semantic) : semantic(semantic) {}; private: void visitOperator(planner::LogicalOperator* op); diff --git a/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h index 7ba83a1d31..8021cda1d8 100644 --- a/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h @@ -18,7 +18,7 @@ class BooleanColumnReader : public TemplatedColumnReader(reader, std::move(type), schema, schemaIdx, maxDefine, maxRepeat), - bytePos(0){}; + bytePos(0) {}; uint8_t bytePos; diff --git a/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h index bf68d45c3c..6cd274745b 100644 --- a/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/callback_column_reader.h @@ -23,8 +23,8 @@ class CallbackColumnReader const ryu_parquet::format::SchemaElement& schema_p, uint64_t file_idx_p, uint64_t max_define_p, uint64_t max_repeat_p) : TemplatedColumnReader>(reader, - std::move(type_p), schema_p, file_idx_p, max_define_p, max_repeat_p) {} + CallbackParquetValueConversion>( + reader, std::move(type_p), schema_p, file_idx_p, max_define_p, max_repeat_p) {} protected: void dictionary(const std::shared_ptr& dictionaryData, diff --git a/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h index e2ab53405f..aacc3c8c11 100644 --- a/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h @@ -30,7 +30,7 @@ class IntervalColumnReader const ryu_parquet::format::SchemaElement& schema, uint64_t fileIdx, uint64_t maxDefine, uint64_t maxRepeat) : TemplatedColumnReader(reader, - std::move(type), schema, fileIdx, maxDefine, maxRepeat){}; + std::move(type), schema, fileIdx, maxDefine, maxRepeat) {}; protected: void dictionary(const std::shared_ptr& dictionaryData, diff --git a/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h index 841a30b823..f5568f6555 100644 --- a/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h @@ -31,7 +31,7 @@ class TemplatedColumnReader : public ColumnReader { TemplatedColumnReader(ParquetReader& reader, common::LogicalType type, const ryu_parquet::format::SchemaElement& schema, uint64_t schemaIdx, uint64_t maxDefine, uint64_t maxRepeat) - : ColumnReader(reader, std::move(type), schema, schemaIdx, maxDefine, maxRepeat){}; + : ColumnReader(reader, std::move(type), schema, schemaIdx, maxDefine, maxRepeat) {}; std::shared_ptr dict; diff --git a/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h b/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h index 24e053a927..c40d39d8b9 100644 --- a/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h +++ b/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h @@ -12,7 +12,7 @@ namespace processor { // A ReadHead for prefetching data in a specific range struct ReadHead { - ReadHead(uint64_t location, uint64_t size) : location(location), size(size){}; + ReadHead(uint64_t location, uint64_t size) : location(location), size(size) {}; // Hint info uint64_t location; uint64_t size; @@ -141,7 +141,7 @@ class ThriftFileTransport handle->getFileSize() - location)); auto prefetch_buffer_fallback = ra_buffer.GetReadHead(location); RYU_ASSERT(location - prefetch_buffer_fallback->location + len <= - prefetch_buffer_fallback->size); + prefetch_buffer_fallback->size); memcpy(buf, prefetch_buffer_fallback->data.get() + location - prefetch_buffer_fallback->location, diff --git a/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h index 87149d08a6..e7705de5bf 100644 --- a/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h @@ -28,7 +28,7 @@ class UUIDColumnReader : public TemplatedColumnReader(reader, std::move(dataType), - schema_p, file_idx_p, maxDefine, maxRepeat){}; + schema_p, file_idx_p, maxDefine, maxRepeat) {}; protected: void dictionary(const std::shared_ptr& dictionaryData, diff --git a/src/include/storage/index/hash_index.h b/src/include/storage/index/hash_index.h index 6d3da5ee5a..40c4fcb098 100644 --- a/src/include/storage/index/hash_index.h +++ b/src/include/storage/index/hash_index.h @@ -284,7 +284,7 @@ class HashIndex final : public OnDiskHashIndex { bool nextChainedSlot(const transaction::Transaction* transaction, SlotIterator& iter) const { RYU_ASSERT(iter.slotInfo.slotType == SlotType::PRIMARY || - iter.slotInfo.slotId != iter.slot.header.nextOvfSlotId); + iter.slotInfo.slotId != iter.slot.header.nextOvfSlotId); if (iter.slot.header.nextOvfSlotId != SlotHeader::INVALID_OVERFLOW_SLOT_ID) { iter.slotInfo.slotId = iter.slot.header.nextOvfSlotId; iter.slotInfo.slotType = SlotType::OVF; diff --git a/src/include/storage/index/in_mem_hash_index.h b/src/include/storage/index/in_mem_hash_index.h index fe99482737..9cad274f61 100644 --- a/src/include/storage/index/in_mem_hash_index.h +++ b/src/include/storage/index/in_mem_hash_index.h @@ -147,7 +147,7 @@ class InMemHashIndex final { // Leaves the slot pointer pointing at the last slot to make it easier to add a new one bool nextChainedSlot(SlotIterator& iter) const { RYU_ASSERT(iter.slotInfo.slotType == SlotType::PRIMARY || - iter.slotInfo.slotId != iter.slot->header.nextOvfSlotId); + iter.slotInfo.slotId != iter.slot->header.nextOvfSlotId); if (iter.slot->header.nextOvfSlotId != SlotHeader::INVALID_OVERFLOW_SLOT_ID) { iter.slotInfo.slotId = iter.slot->header.nextOvfSlotId; iter.slotInfo.slotType = SlotType::OVF; diff --git a/src/include/storage/page_range.h b/src/include/storage/page_range.h index bbdf62dce7..7787d1f138 100644 --- a/src/include/storage/page_range.h +++ b/src/include/storage/page_range.h @@ -5,7 +5,7 @@ namespace ryu::storage { struct PageRange { - PageRange() : startPageIdx(common::INVALID_PAGE_IDX), numPages(0){}; + PageRange() : startPageIdx(common::INVALID_PAGE_IDX), numPages(0) {}; PageRange(common::page_idx_t startPageIdx, common::page_idx_t numPages) : startPageIdx(startPageIdx), numPages(numPages) {} diff --git a/src/include/storage/table/column_chunk.h b/src/include/storage/table/column_chunk.h index 6b49cc09ed..dcd24e914d 100644 --- a/src/include/storage/table/column_chunk.h +++ b/src/include/storage/table/column_chunk.h @@ -214,7 +214,8 @@ class ColumnChunk { ResidencyState getResidencyState() const { auto state = data.front()->getResidencyState(); - RUNTIME_CHECK(for (auto& chunk : data) { RYU_ASSERT(chunk->getResidencyState() == state); }); + RUNTIME_CHECK(for (auto& chunk + : data) { RYU_ASSERT(chunk->getResidencyState() == state); }); return state; } bool hasUpdates() const { return updateInfo.isSet(); } diff --git a/src/include/storage/table/column_chunk_scanner.h b/src/include/storage/table/column_chunk_scanner.h index c5ef30c550..70104f0204 100644 --- a/src/include/storage/table/column_chunk_scanner.h +++ b/src/include/storage/table/column_chunk_scanner.h @@ -15,7 +15,7 @@ struct ColumnChunkScanner { using scan_func_t = std::function; - virtual ~ColumnChunkScanner(){}; + virtual ~ColumnChunkScanner() {}; virtual void scanSegment(common::offset_t offsetInSegment, common::offset_t segmentLength, scan_func_t scanFunc) = 0; virtual void applyCommittedUpdates(const UpdateInfo& updateInfo, diff --git a/src/include/storage/table/lazy_segment_scanner.h b/src/include/storage/table/lazy_segment_scanner.h index 6b0b1ea190..6bc404fec5 100644 --- a/src/include/storage/table/lazy_segment_scanner.h +++ b/src/include/storage/table/lazy_segment_scanner.h @@ -70,7 +70,7 @@ class LazySegmentScanner : public ColumnChunkScanner { inline LazySegmentData& LazySegmentScanner::Iterator::operator*() const { RYU_ASSERT(segmentIdx < segmentScanner.segments.size() && - offsetInSegment < segmentScanner.segments[segmentIdx].length); + offsetInSegment < segmentScanner.segments[segmentIdx].length); return segmentScanner.segments[segmentIdx]; } diff --git a/src/main/db_config.cpp b/src/main/db_config.cpp index 0c3592e01f..399636ccd0 100644 --- a/src/main/db_config.cpp +++ b/src/main/db_config.cpp @@ -10,7 +10,7 @@ namespace ryu { namespace main { #define GET_CONFIGURATION(_PARAM) \ - { _PARAM::name, _PARAM::inputType, _PARAM::setContext, _PARAM::getSetting } + {_PARAM::name, _PARAM::inputType, _PARAM::setContext, _PARAM::getSetting} static ConfigurationOption options[] = { // NOLINT(cert-err58-cpp): GET_CONFIGURATION(ThreadsSetting), GET_CONFIGURATION(TimeoutSetting), diff --git a/src/planner/join_order/join_tree_constructor.cpp b/src/planner/join_order/join_tree_constructor.cpp index 370074b2f8..eb70a123fc 100644 --- a/src/planner/join_order/join_tree_constructor.cpp +++ b/src/planner/join_order/join_tree_constructor.cpp @@ -65,7 +65,7 @@ JoinTreeConstructor::IntermediateResult JoinTreeConstructor::constructTreeNode( return constructNodeScan(hintNode->nodeOrRel); } else { RYU_ASSERT(ExpressionUtil::isRelPattern(*hintNode->nodeOrRel) || - ExpressionUtil::isRecursiveRelPattern(*hintNode->nodeOrRel)); + ExpressionUtil::isRecursiveRelPattern(*hintNode->nodeOrRel)); return constructRelScan(hintNode->nodeOrRel); } } diff --git a/src/processor/map/map_expressions_scan.cpp b/src/processor/map/map_expressions_scan.cpp index 529bbe584a..fb05a861f2 100644 --- a/src/processor/map/map_expressions_scan.cpp +++ b/src/processor/map/map_expressions_scan.cpp @@ -30,7 +30,8 @@ std::unique_ptr PlanMapper::mapExpressionsScan( RYU_ASSERT(logicalOpToPhysicalOpMap.contains(outerAccumulate)); auto physicalOp = logicalOpToPhysicalOpMap.at(outerAccumulate); RYU_ASSERT(physicalOp->getOperatorType() == PhysicalOperatorType::TABLE_FUNCTION_CALL); - RYU_ASSERT(physicalOp->getChild(0)->getOperatorType() == PhysicalOperatorType::RESULT_COLLECTOR); + RYU_ASSERT( + physicalOp->getChild(0)->getOperatorType() == PhysicalOperatorType::RESULT_COLLECTOR); auto resultCollector = physicalOp->getChild(0)->ptrCast(); auto table = resultCollector->getResultFTable(); return createFTableScan(expressionsToScan, colIndicesToScan, schema, table, diff --git a/src/processor/map/map_recursive_extend.cpp b/src/processor/map/map_recursive_extend.cpp index e0c35cfc46..1380a120ca 100644 --- a/src/processor/map/map_recursive_extend.cpp +++ b/src/processor/map/map_recursive_extend.cpp @@ -52,7 +52,7 @@ std::unique_ptr PlanMapper::mapRecursiveExtend( RYU_ASSERT(extend.getNumChildren() == 1); auto logicalRoot = extend.getChild(0); RYU_ASSERT(logicalRoot->getNumChildren() == 1 && - logicalRoot->getChild(0)->getOperatorType() == LogicalOperatorType::SEMI_MASKER); + logicalRoot->getChild(0)->getOperatorType() == LogicalOperatorType::SEMI_MASKER); auto logicalSemiMasker = logicalRoot->getChild(0)->ptrCast(); logicalSemiMasker->addTarget(logicalOperator); for (auto tableID : logicalSemiMasker->getNodeTableIDs()) { diff --git a/src/processor/operator/hash_join/hash_join_probe.cpp b/src/processor/operator/hash_join/hash_join_probe.cpp index 2ccb8e876d..c167335f64 100644 --- a/src/processor/operator/hash_join/hash_join_probe.cpp +++ b/src/processor/operator/hash_join/hash_join_probe.cpp @@ -31,7 +31,7 @@ void HashJoinProbe::initLocalStateInternal(ResultSet* resultSet, ExecutionContex // We only need to read nonKeys from the factorizedTable. Key columns are always kept as first k // columns in the factorizedTable, so we skip the first k columns. RYU_ASSERT(probeDataInfo.keysDataPos.size() + probeDataInfo.getNumPayloads() + 2 == - sharedState->getHashTable()->getTableSchema()->getNumColumns()); + sharedState->getHashTable()->getTableSchema()->getNumColumns()); columnIdxsToReadFrom.resize(probeDataInfo.getNumPayloads()); iota(columnIdxsToReadFrom.begin(), columnIdxsToReadFrom.end(), probeDataInfo.keysDataPos.size()); diff --git a/src/processor/operator/order_by/key_block_merger.cpp b/src/processor/operator/order_by/key_block_merger.cpp index b6c07b10ac..2ff9636283 100644 --- a/src/processor/operator/order_by/key_block_merger.cpp +++ b/src/processor/operator/order_by/key_block_merger.cpp @@ -139,7 +139,7 @@ std::unique_ptr KeyBlockMergeTask::getMorsel() { void KeyBlockMerger::mergeKeyBlocks(KeyBlockMergeMorsel& keyBlockMergeMorsel) const { RYU_ASSERT(keyBlockMergeMorsel.leftKeyBlockStartIdx < keyBlockMergeMorsel.leftKeyBlockEndIdx || - keyBlockMergeMorsel.rightKeyBlockStartIdx < keyBlockMergeMorsel.rightKeyBlockEndIdx); + keyBlockMergeMorsel.rightKeyBlockStartIdx < keyBlockMergeMorsel.rightKeyBlockEndIdx); auto leftBlockPtrInfo = BlockPtrInfo(keyBlockMergeMorsel.leftKeyBlockStartIdx, keyBlockMergeMorsel.leftKeyBlockEndIdx, diff --git a/src/processor/operator/partitioner.cpp b/src/processor/operator/partitioner.cpp index c3663aa179..1d04017f82 100644 --- a/src/processor/operator/partitioner.cpp +++ b/src/processor/operator/partitioner.cpp @@ -21,7 +21,7 @@ std::string PartitionerPrintInfo::toString() const { void PartitionerFunctions::partitionRelData(ValueVector* key, ValueVector* partitionIdxes) { RYU_ASSERT(key->state == partitionIdxes->state && - key->dataType.getPhysicalType() == PhysicalTypeID::INT64); + key->dataType.getPhysicalType() == PhysicalTypeID::INT64); for (auto i = 0u; i < key->state->getSelVector().getSelSize(); i++) { const auto pos = key->state->getSelVector()[i]; const partition_idx_t partitionIdx = diff --git a/src/processor/operator/persistent/copy_rel_batch_insert.cpp b/src/processor/operator/persistent/copy_rel_batch_insert.cpp index 321512390d..a93a85b65d 100644 --- a/src/processor/operator/persistent/copy_rel_batch_insert.cpp +++ b/src/processor/operator/persistent/copy_rel_batch_insert.cpp @@ -34,7 +34,7 @@ void CopyRelBatchInsert::populateCSRLengthsInternal(const storage::InMemChunkedC common::offset_t numNodes, storage::InMemChunkedNodeGroupCollection& partition, common::column_id_t boundNodeOffsetColumn) { RYU_ASSERT(numNodes == csrHeader.length->getNumValues() && - numNodes == csrHeader.offset->getNumValues()); + numNodes == csrHeader.offset->getNumValues()); const auto lengthData = reinterpret_cast(csrHeader.length->getData()); std::fill(lengthData, lengthData + numNodes, 0); for (auto& chunkedGroup : partition.getChunkedGroups()) { diff --git a/src/processor/operator/persistent/reader/copy_from_error.cpp b/src/processor/operator/persistent/reader/copy_from_error.cpp index b31b0814d6..f532c8fcac 100644 --- a/src/processor/operator/persistent/reader/copy_from_error.cpp +++ b/src/processor/operator/persistent/reader/copy_from_error.cpp @@ -40,7 +40,7 @@ template WarningSourceData WarningSourceData::constructFromData(const std::vector& data, common::idx_t pos) { RYU_ASSERT(data.size() >= CopyConstants::SHARED_WARNING_DATA_NUM_COLUMNS && - data.size() <= CopyConstants::MAX_NUM_WARNING_DATA_COLUMNS); + data.size() <= CopyConstants::MAX_NUM_WARNING_DATA_COLUMNS); WarningSourceData ret{data.size()}; for (idx_t i = 0; i < data.size(); ++i) { ret.values[i] = getValueFromData(data[i], pos); diff --git a/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp b/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp index e2530d5043..7596e9278b 100644 --- a/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp +++ b/src/processor/operator/persistent/reader/csv/base_csv_reader.cpp @@ -332,7 +332,7 @@ BaseCSVReader::parse_result_t BaseCSVReader::parseCSV(Driver& driver) { add_value: // We get here after we have a delimiter. RYU_ASSERT(buffer[position] == option.delimiter || - buffer[position] == CopyConstants::DEFAULT_CSV_LIST_END_CHAR); + buffer[position] == CopyConstants::DEFAULT_CSV_LIST_END_CHAR); // Trim one character if we have quotes. if (!addValue(driver, curRowIdx, column, std::string_view(buffer.get() + start, position - start - hasQuotes), diff --git a/src/storage/compression/compression.cpp b/src/storage/compression/compression.cpp index a342541e83..f6d4b85f2c 100644 --- a/src/storage/compression/compression.cpp +++ b/src/storage/compression/compression.cpp @@ -649,12 +649,12 @@ void IntegerBitpacking::setValuesFromUncompressed(const uint8_t* srcBuffer, o // Currently they will be mangled by storage+recovery (underflow in the subtraction // below) RYU_ASSERT(numValues == static_cast(std::ranges::count_if( - std::ranges::iota_view{posInSrc, posInSrc + numValues}, - [srcBuffer, &metadata, nullMask](offset_t i) { - auto value = reinterpret_cast(srcBuffer)[i]; - return (nullMask && nullMask->isNull(i)) || - canUpdateInPlace(std::span(&value, 1), metadata); - }))); + std::ranges::iota_view{posInSrc, posInSrc + numValues}, + [srcBuffer, &metadata, nullMask](offset_t i) { + auto value = reinterpret_cast(srcBuffer)[i]; + return (nullMask && nullMask->isNull(i)) || + canUpdateInPlace(std::span(&value, 1), metadata); + }))); // Data can be considered to be stored in aligned chunks of 32 values // with a size of 32 * bitWidth bits, diff --git a/src/storage/compression/float_compression.cpp b/src/storage/compression/float_compression.cpp index 7fd9bd8654..211e15a77e 100644 --- a/src/storage/compression/float_compression.cpp +++ b/src/storage/compression/float_compression.cpp @@ -146,13 +146,13 @@ void FloatCompression::setValuesFromUncompressed(const uint8_t* srcBuffer, // each individual value that is being updated should be able to be updated in place RUNTIME_CHECK(InPlaceUpdateLocalState localUpdateState{}); RYU_ASSERT(numValues == - static_cast( - std::ranges::count_if(std::ranges::iota_view{srcOffset, srcOffset + numValues}, - [&localUpdateState, srcBuffer, &metadata, nullMask](common::offset_t i) { - auto value = reinterpret_cast(srcBuffer)[i]; - return (nullMask && nullMask->isNull(i)) || - canUpdateInPlace(std::span(&value, 1), metadata, localUpdateState); - }))); + static_cast(std::ranges::count_if( + std::ranges::iota_view{srcOffset, srcOffset + numValues}, + [&localUpdateState, srcBuffer, &metadata, nullMask](common::offset_t i) { + auto value = reinterpret_cast(srcBuffer)[i]; + return (nullMask && nullMask->isNull(i)) || + canUpdateInPlace(std::span(&value, 1), metadata, localUpdateState); + }))); std::vector integerEncodedValues(numValues); for (size_t i = 0; i < numValues; ++i) { diff --git a/src/storage/disk_array.cpp b/src/storage/disk_array.cpp index d1508b1ca7..ba967c822b 100644 --- a/src/storage/disk_array.cpp +++ b/src/storage/disk_array.cpp @@ -167,7 +167,7 @@ void DiskArrayInternal::setNextPIPPageIDxOfPIPNoLock(uint64_t pipIdxOfPreviousPI pipUpdates.updatedLastPIP->pipContents.nextPipPageIdx = nextPIPPageIdx; } else { RYU_ASSERT(pipIdxOfPreviousPIP >= pips.size() && - pipUpdates.newPIPs.size() > pipIdxOfPreviousPIP - pips.size()); + pipUpdates.newPIPs.size() > pipIdxOfPreviousPIP - pips.size()); pipUpdates.newPIPs[pipIdxOfPreviousPIP - pips.size()].pipContents.nextPipPageIdx = nextPIPPageIdx; } diff --git a/src/storage/free_space_manager.cpp b/src/storage/free_space_manager.cpp index c6bb07b37e..d9bc50e9c3 100644 --- a/src/storage/free_space_manager.cpp +++ b/src/storage/free_space_manager.cpp @@ -18,7 +18,8 @@ static FreeSpaceManager::sorted_free_list_t& getFreeList( return freeLists[level]; } -FreeSpaceManager::FreeSpaceManager() : freeLists{}, numEntries(0), needClearEvictedEntries(false){}; +FreeSpaceManager::FreeSpaceManager() + : freeLists{}, numEntries(0), needClearEvictedEntries(false) {}; common::idx_t FreeSpaceManager::getLevel(common::page_idx_t numPages) { // level is exponent of largest power of 2 that is <= numPages diff --git a/src/storage/index/hash_index.cpp b/src/storage/index/hash_index.cpp index 73568bb49f..2c25052ce4 100644 --- a/src/storage/index/hash_index.cpp +++ b/src/storage/index/hash_index.cpp @@ -358,7 +358,7 @@ size_t HashIndex::mergeSlot(PageAllocator& pageAllocator, const Transaction* // in the slot to merge OnDiskSlotType* diskSlot = &*diskSlotIterator.seek(diskSlotId); RYU_ASSERT(diskSlot->header.nextOvfSlotId == SlotHeader::INVALID_OVERFLOW_SLOT_ID || - diskOverflowSlotIterator.size() > diskSlot->header.nextOvfSlotId); + diskOverflowSlotIterator.size() > diskSlot->header.nextOvfSlotId); // Merge slot from local storage to an existing slot. size_t merged = 0; for (auto it = std::rbegin(slotToMerge); it != std::rend(slotToMerge); ++it) { diff --git a/src/storage/index/in_mem_hash_index.cpp b/src/storage/index/in_mem_hash_index.cpp index 3de6f578c8..d832c3733e 100644 --- a/src/storage/index/in_mem_hash_index.cpp +++ b/src/storage/index/in_mem_hash_index.cpp @@ -125,7 +125,7 @@ void InMemHashIndex::splitSlot() { if (!originalSlot.slot->header.isEntryValid(entryPos)) { // Check that this function leaves no gaps RYU_ASSERT(originalSlot.slot->header.numEntries() == - std::countr_one(originalSlot.slot->header.validityMask)); + std::countr_one(originalSlot.slot->header.validityMask)); // There should be no gaps, so when we encounter an invalid entry we can return // early reclaimOverflowSlots(originalSlotForInsert); @@ -168,7 +168,7 @@ void InMemHashIndex::splitSlot() { } } RYU_ASSERT(originalSlot.slot->header.numEntries() == - std::countr_one(originalSlot.slot->header.validityMask)); + std::countr_one(originalSlot.slot->header.validityMask)); } while (nextChainedSlot(originalSlot)); reclaimOverflowSlots(originalSlotForInsert); diff --git a/src/storage/table/chunked_node_group.cpp b/src/storage/table/chunked_node_group.cpp index 68665f910a..c6fd5b35b0 100644 --- a/src/storage/table/chunked_node_group.cpp +++ b/src/storage/table/chunked_node_group.cpp @@ -101,7 +101,7 @@ ChunkedNodeGroup::ChunkedNodeGroup(MemoryManager& mm, ChunkedNodeGroup& base, chunks[baseColumnID] = base.moveColumnChunk(i); enableCompression = chunks[baseColumnID]->isCompressionEnabled(); RYU_ASSERT(chunks[baseColumnID]->getDataType().getPhysicalType() == - columnTypes[baseColumnID].getPhysicalType()); + columnTypes[baseColumnID].getPhysicalType()); } for (column_id_t i = 0; i < columnTypes.size(); ++i) { diff --git a/src/storage/table/column_chunk_data.cpp b/src/storage/table/column_chunk_data.cpp index 46152280dd..0ac765ea6b 100644 --- a/src/storage/table/column_chunk_data.cpp +++ b/src/storage/table/column_chunk_data.cpp @@ -394,8 +394,8 @@ void ColumnChunkData::lookup(offset_t offsetInChunk, ValueVector& output, void ColumnChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity multiplicity) { RYU_ASSERT(chunk->dataType.getPhysicalType() == dataType.getPhysicalType() && - dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && - chunk->getNumValues() == dstOffsets->getNumValues()); + dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && + chunk->getNumValues() == dstOffsets->getNumValues()); for (auto i = 0u; i < dstOffsets->getNumValues(); i++) { const auto dstOffset = dstOffsets->getValue(i); RYU_ASSERT(dstOffset < capacity); @@ -428,8 +428,8 @@ void ColumnChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, void ColumnChunkData::write(const ValueVector* vector, offset_t offsetInVector, offset_t offsetInChunk) { RYU_ASSERT(dataType.getPhysicalType() != PhysicalTypeID::BOOL && - dataType.getPhysicalType() != PhysicalTypeID::LIST && - dataType.getPhysicalType() != PhysicalTypeID::ARRAY); + dataType.getPhysicalType() != PhysicalTypeID::LIST && + dataType.getPhysicalType() != PhysicalTypeID::ARRAY); if (nullData) { nullData->setNull(offsetInChunk, vector->isNull(offsetInVector)); } @@ -680,8 +680,8 @@ void BoolChunkData::lookup(offset_t offsetInChunk, ValueVector& output, void BoolChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity) { RYU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::BOOL && - dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && - chunk->getNumValues() == dstOffsets->getNumValues()); + dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && + chunk->getNumValues() == dstOffsets->getNumValues()); for (auto i = 0u; i < dstOffsets->getNumValues(); i++) { const auto dstOffset = dstOffsets->getValue(i); RYU_ASSERT(dstOffset < capacity); diff --git a/src/storage/table/column_reader_writer.cpp b/src/storage/table/column_reader_writer.cpp index 441d88844b..e94d0130ed 100644 --- a/src/storage/table/column_reader_writer.cpp +++ b/src/storage/table/column_reader_writer.cpp @@ -271,8 +271,8 @@ class FloatColumnReadWriter final : public ColumnReadWriter { for (; curExceptionIdx < exceptionChunk->getExceptionCount(); ++curExceptionIdx) { const auto curException = exceptionChunk->getExceptionAt(curExceptionIdx); RYU_ASSERT(curExceptionIdx == 0 || - curException.posInChunk > - exceptionChunk->getExceptionAt(curExceptionIdx - 1).posInChunk); + curException.posInChunk > + exceptionChunk->getExceptionAt(curExceptionIdx - 1).posInChunk); RYU_ASSERT(curException.posInChunk >= curExceptionIdx); if (curException.posInChunk >= startOffsetInChunk + numValuesToScan) { break; @@ -296,8 +296,8 @@ class FloatColumnReadWriter final : public ColumnReadWriter { const read_value_from_page_func_t& readFunc) { RUNTIME_CHECK(const ColumnChunkMetadata& metadata = state.metadata); RYU_ASSERT(metadata.compMeta.compression == CompressionType::ALP || - metadata.compMeta.compression == CompressionType::CONSTANT || - metadata.compMeta.compression == CompressionType::UNCOMPRESSED); + metadata.compMeta.compression == CompressionType::CONSTANT || + metadata.compMeta.compression == CompressionType::UNCOMPRESSED); std::optional filterFunc{}; readCompressedValues(state, result, offsetInResult, offsetInSegment, 1, readFunc, filterFunc); @@ -310,8 +310,8 @@ class FloatColumnReadWriter final : public ColumnReadWriter { const std::optional& filterFunc) { const ColumnChunkMetadata& metadata = state.metadata; RYU_ASSERT(metadata.compMeta.compression == CompressionType::ALP || - metadata.compMeta.compression == CompressionType::CONSTANT || - metadata.compMeta.compression == CompressionType::UNCOMPRESSED); + metadata.compMeta.compression == CompressionType::CONSTANT || + metadata.compMeta.compression == CompressionType::UNCOMPRESSED); const uint64_t numValuesScanned = defaultReader->readCompressedValues(state, result, startOffsetInResult, diff --git a/src/storage/table/csr_node_group.cpp b/src/storage/table/csr_node_group.cpp index b12a14331f..cda92b41d6 100644 --- a/src/storage/table/csr_node_group.cpp +++ b/src/storage/table/csr_node_group.cpp @@ -527,7 +527,7 @@ void CSRNodeGroup::checkpointInMemAndOnDisk(const UniqLock& lock, NodeGroupCheck // The left node offset of a region should always maintain stable across length and // offset changes. RYU_ASSERT(csrState.oldHeader->getStartCSROffset(region.leftNodeOffset) == - csrState.newHeader->getStartCSROffset(region.leftNodeOffset)); + csrState.newHeader->getStartCSROffset(region.leftNodeOffset)); } } @@ -735,7 +735,7 @@ static void writeCSRListNoPersistentDeletions(CheckpointReadCursor& readCursor, [[maybe_unused]] auto [readSegmentData, readOffsetInSegment] = readCursor.getDataToRead(); RYU_ASSERT(readSegmentData == segmentData.segmentData.get() && - readOffsetInSegment == offsetInSegment); + readOffsetInSegment == offsetInSegment); writeCursor.appendToCurrentSegment(segmentData.segmentData.get(), offsetInSegment, lengthInSegment); } @@ -861,7 +861,7 @@ std::vector CSRNodeGroup::checkpointColumnInRegion(const U const length_t numOldGaps = csrState.oldHeader->getGapSize(nodeOffset); // Gaps should only happen at the end of the CSR region. RYU_ASSERT(numGaps == 0 || (nodeOffset == region.rightNodeOffset - 1) || - (nodeOffset + 1) % StorageConfig::CSR_LEAF_REGION_SIZE == 0); + (nodeOffset + 1) % StorageConfig::CSR_LEAF_REGION_SIZE == 0); fillCSRGaps(readCursor, writeCursor, dummyChunkForNulls.get(), numOldGaps, numGaps); } writeCursor.finalize(); @@ -870,7 +870,7 @@ std::vector CSRNodeGroup::checkpointColumnInRegion(const U writeCursor.getCSROffset() == csrState.newHeader->getEndCSROffset(region.rightNodeOffset)); // We can't skip writing appends as they need to be flushed to disk RYU_ASSERT(readCursor.getCSROffset() == writeCursor.getCSROffset() || ret.empty() || - ret.back().startRow + ret.back().numRows == writeCursor.getCSROffset()); + ret.back().startRow + ret.back().numRows == writeCursor.getCSROffset()); return ret; } @@ -1071,7 +1071,7 @@ void CSRNodeGroup::checkpointInMemOnly(const UniqLock& lock, NodeGroupCheckpoint while (gapSize > 0) { // Gaps should only happen at the end of the CSR region. RYU_ASSERT((offset == numNodes - 1) || - (offset + 1) % StorageConfig::CSR_LEAF_REGION_SIZE == 0); + (offset + 1) % StorageConfig::CSR_LEAF_REGION_SIZE == 0); const auto numGapsToAppend = std::min(gapSize, DEFAULT_VECTOR_CAPACITY); RYU_ASSERT(dummyChunk.state->getSelVector().isUnfiltered()); dummyChunk.state->getSelVectorUnsafe().setSelSize(numGapsToAppend); diff --git a/src/storage/table/dictionary_chunk.cpp b/src/storage/table/dictionary_chunk.cpp index a72a103359..f5a5a30feb 100644 --- a/src/storage/table/dictionary_chunk.cpp +++ b/src/storage/table/dictionary_chunk.cpp @@ -45,7 +45,7 @@ uint64_t DictionaryChunk::getStringLength(string_index_t index) const { } if (index + 1 < offsetChunk->getNumValues()) { RYU_ASSERT(offsetChunk->getValue(index + 1) >= - offsetChunk->getValue(index)); + offsetChunk->getValue(index)); return offsetChunk->getValue(index + 1) - offsetChunk->getValue(index); } diff --git a/src/storage/table/dictionary_column.cpp b/src/storage/table/dictionary_column.cpp index 1f8e14de77..f6cd78edb9 100644 --- a/src/storage/table/dictionary_column.cpp +++ b/src/storage/table/dictionary_column.cpp @@ -130,7 +130,7 @@ void DictionaryColumn::scan(const SegmentState& offsetState, const SegmentState& // consecutive, since that would break the mechanism for calculating the size of a // string. RYU_ASSERT(pos == offsetsToScan.size() - 1 || - offsetsToScan[pos].first != offsetsToScan[pos + 1].first); + offsetsToScan[pos].first != offsetsToScan[pos + 1].first); } } } diff --git a/src/storage/table/list_chunk_data.cpp b/src/storage/table/list_chunk_data.cpp index 2c26a90c04..f1aa17622f 100644 --- a/src/storage/table/list_chunk_data.cpp +++ b/src/storage/table/list_chunk_data.cpp @@ -32,7 +32,7 @@ ListChunkData::ListChunkData(MemoryManager& memoryManager, LogicalType dataType, residencyState); checkOffsetSortedAsc = false; RYU_ASSERT(this->dataType.getPhysicalType() == PhysicalTypeID::LIST || - this->dataType.getPhysicalType() == PhysicalTypeID::ARRAY); + this->dataType.getPhysicalType() == PhysicalTypeID::ARRAY); } ListChunkData::ListChunkData(MemoryManager& memoryManager, LogicalType dataType, @@ -235,8 +235,8 @@ void ListChunkData::initializeScanState(SegmentState& state, const Column* colum void ListChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity) { RYU_ASSERT(chunk->getDataType().getPhysicalType() == dataType.getPhysicalType() && - dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && - chunk->getNumValues() == dstOffsets->getNumValues()); + dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && + chunk->getNumValues() == dstOffsets->getNumValues()); checkOffsetSortedAsc = true; offset_t currentIndex = dataColumnChunk->getNumValues(); auto& otherListChunk = chunk->cast(); @@ -289,7 +289,7 @@ void ListChunkData::write(const ValueVector* vector, offset_t offsetInVector, void ListChunkData::write(const ColumnChunkData* srcChunk, offset_t srcOffsetInChunk, offset_t dstOffsetInChunk, offset_t numValuesToCopy) { RYU_ASSERT(srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::LIST || - srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::ARRAY); + srcChunk->getDataType().getPhysicalType() == PhysicalTypeID::ARRAY); checkOffsetSortedAsc = true; auto& srcListChunk = srcChunk->cast(); auto offsetInDataChunkToAppend = dataColumnChunk->getNumValues(); diff --git a/src/storage/table/list_column.cpp b/src/storage/table/list_column.cpp index 123cdd73ec..ee61ba48d6 100644 --- a/src/storage/table/list_column.cpp +++ b/src/storage/table/list_column.cpp @@ -137,7 +137,7 @@ void ListColumn::scanSegment(const SegmentState& state, ColumnChunkData* resultC auto resizeNumValues = listColumnChunk.getDataColumnChunk()->getNumValues(); bool isOffsetSortedAscending = true; RYU_ASSERT(listColumnChunk.getSizeColumnChunk()->getNumValues() == - startOffsetInResult + numValuesToScan); + startOffsetInResult + numValuesToScan); offset_t prevOffset = listColumnChunk.getListStartOffset(startOffsetInResult); for (auto i = startOffsetInResult; i < startOffsetInResult + numValuesToScan; i++) { auto currentEndOffset = listColumnChunk.getListEndOffset(i); @@ -423,9 +423,9 @@ std::vector> ListColumn::checkpointSegment( Column::checkpointNullData(checkpointState, pageAllocator); RYU_ASSERT(persistentListChunk.getNullData()->getNumValues() == - persistentListChunk.getOffsetColumnChunk()->getNumValues() && - persistentListChunk.getNullData()->getNumValues() == - persistentListChunk.getSizeColumnChunk()->getNumValues()); + persistentListChunk.getOffsetColumnChunk()->getNumValues() && + persistentListChunk.getNullData()->getNumValues() == + persistentListChunk.getSizeColumnChunk()->getNumValues()); persistentListChunk.syncNumValues(); return {}; diff --git a/src/storage/table/node_group.cpp b/src/storage/table/node_group.cpp index 1cbe876086..9249943e66 100644 --- a/src/storage/table/node_group.cpp +++ b/src/storage/table/node_group.cpp @@ -142,7 +142,7 @@ void NodeGroup::merge(Transaction*, std::unique_ptr chunkedGro RYU_ASSERT(chunkedGroup->getNumColumns() == dataTypes.size()); for (auto i = 0u; i < chunkedGroup->getNumColumns(); i++) { RYU_ASSERT(chunkedGroup->getColumnChunk(i).getDataType().getPhysicalType() == - dataTypes[i].getPhysicalType()); + dataTypes[i].getPhysicalType()); } const auto lock = chunkedGroups.lock(); numRows += chunkedGroup->getNumRows(); @@ -264,7 +264,7 @@ NodeGroupScanResult NodeGroup::scan(Transaction* transaction, TableScanState& st } if (state.outputVectors.size() == 0) { RYU_ASSERT(scanInternal(chunkedGroups.lock(), transaction, state, startOffsetInGroup, - numRowsToScan) == NodeGroupScanResult(startOffsetInGroup, numRowsToScan)); + numRowsToScan) == NodeGroupScanResult(startOffsetInGroup, numRowsToScan)); return NodeGroupScanResult{startOffsetInGroup, numRowsToScan}; } return scanInternal(chunkedGroups.lock(), transaction, state, startOffsetInGroup, diff --git a/src/storage/table/node_table.cpp b/src/storage/table/node_table.cpp index 64259045d3..5a53076ad7 100644 --- a/src/storage/table/node_table.cpp +++ b/src/storage/table/node_table.cpp @@ -468,7 +468,7 @@ void NodeTable::update(Transaction* transaction, TableUpdateState& updateState) // We should optimize this to take unflattened input later. auto& nodeUpdateState = updateState.constCast(); RYU_ASSERT(nodeUpdateState.nodeIDVector.state->getSelVector().getSelSize() == 1 && - nodeUpdateState.propertyVector.state->getSelVector().getSelSize() == 1); + nodeUpdateState.propertyVector.state->getSelVector().getSelSize() == 1); const auto pos = nodeUpdateState.nodeIDVector.state->getSelVector()[0]; if (nodeUpdateState.nodeIDVector.isNull(pos)) { return; diff --git a/src/storage/table/rel_table.cpp b/src/storage/table/rel_table.cpp index 2c51d441a6..f2a1f65769 100644 --- a/src/storage/table/rel_table.cpp +++ b/src/storage/table/rel_table.cpp @@ -180,7 +180,7 @@ void RelTable::checkRelMultiplicityConstraint(Transaction* transaction, const TableInsertState& state) const { const auto& insertState = state.constCast(); RYU_ASSERT(insertState.srcNodeIDVector.state->getSelVector().getSelSize() == 1 && - insertState.dstNodeIDVector.state->getSelVector().getSelSize() == 1); + insertState.dstNodeIDVector.state->getSelVector().getSelSize() == 1); for (auto& relData : directedRelData) { if (relData->getMultiplicity() == RelMultiplicity::ONE) { diff --git a/src/storage/table/rel_table_data.cpp b/src/storage/table/rel_table_data.cpp index f9190c6cd3..7457a563f4 100644 --- a/src/storage/table/rel_table_data.cpp +++ b/src/storage/table/rel_table_data.cpp @@ -230,8 +230,8 @@ void RelTableData::pushInsertInfo(const Transaction* transaction, const CSRNodeG // we shouldn't be appending directly to the to the persistent data // unless we are performing batch insert and the persistent chunked group is empty RYU_ASSERT(source != CSRNodeGroupScanSource::COMMITTED_PERSISTENT || - !nodeGroup.getPersistentChunkedGroup() || - nodeGroup.getPersistentChunkedGroup()->getNumRows() == 0); + !nodeGroup.getPersistentChunkedGroup() || + nodeGroup.getPersistentChunkedGroup()->getNumRows() == 0); const auto [startRow, shouldIncrementNumRows] = (source == CSRNodeGroupScanSource::COMMITTED_PERSISTENT) ? diff --git a/src/storage/table/string_chunk_data.cpp b/src/storage/table/string_chunk_data.cpp index cb0cb73984..c8fe912f3c 100644 --- a/src/storage/table/string_chunk_data.cpp +++ b/src/storage/table/string_chunk_data.cpp @@ -164,8 +164,8 @@ void StringChunkData::write(const ValueVector* vector, offset_t offsetInVector, void StringChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity) { RYU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING && - dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && - chunk->getNumValues() == dstOffsets->getNumValues()); + dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID && + chunk->getNumValues() == dstOffsets->getNumValues()); auto& stringChunk = chunk->cast(); for (auto i = 0u; i < chunk->getNumValues(); i++) { auto offsetInChunk = dstOffsets->getValue(i); diff --git a/src/storage/table/string_column.cpp b/src/storage/table/string_column.cpp index 0ba33b9cef..9a9fd07583 100644 --- a/src/storage/table/string_column.cpp +++ b/src/storage/table/string_column.cpp @@ -192,8 +192,8 @@ void StringColumn::scanSegment(const SegmentState& state, ColumnChunkData* resul getChildState(state, ChildStateIndex::INDEX).metadata); } RYU_ASSERT(resultChunk->getNumValues() == startOffsetInResult + numValuesToScan && - stringResultChunk->getIndexColumnChunk()->getNumValues() == - startOffsetInResult + numValuesToScan); + stringResultChunk->getIndexColumnChunk()->getNumValues() == + startOffsetInResult + numValuesToScan); RUNTIME_CHECK({ auto dictionarySize = stringResultChunk->getDictionaryChunk().getOffsetChunk()->getNumValues(); diff --git a/src/storage/table/struct_chunk_data.cpp b/src/storage/table/struct_chunk_data.cpp index 29e250ec22..1db3e2f52e 100644 --- a/src/storage/table/struct_chunk_data.cpp +++ b/src/storage/table/struct_chunk_data.cpp @@ -222,7 +222,7 @@ void StructChunkData::write(const ValueVector* vector, offset_t offsetInVector, void StructChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity multiplicity) { RYU_ASSERT(chunk->getDataType().getPhysicalType() == PhysicalTypeID::STRUCT && - dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID); + dstOffsets->getDataType().getPhysicalType() == PhysicalTypeID::INTERNAL_ID); for (auto i = 0u; i < dstOffsets->getNumValues(); i++) { const auto offsetInChunk = dstOffsets->getValue(i); RYU_ASSERT(offsetInChunk < capacity); diff --git a/src/storage/table/update_info.cpp b/src/storage/table/update_info.cpp index d9084a920b..87d74b05f7 100644 --- a/src/storage/table/update_info.cpp +++ b/src/storage/table/update_info.cpp @@ -131,9 +131,9 @@ void UpdateInfo::iterateVectorInfo(const Transaction* transaction, idx_t idx, if (current->version == transaction->getID() || current->version <= transaction->getStartTS()) { RYU_ASSERT((current->version == transaction->getID() && - current->version >= Transaction::START_TRANSACTION_ID) || - (current->version <= transaction->getStartTS() && - current->version < Transaction::START_TRANSACTION_ID)); + current->version >= Transaction::START_TRANSACTION_ID) || + (current->version <= transaction->getStartTS() && + current->version < Transaction::START_TRANSACTION_ID)); func(*current); } current = current->getPrev(); diff --git a/src/storage/table/version_info.cpp b/src/storage/table/version_info.cpp index b0f789ebed..cc5e864cfd 100644 --- a/src/storage/table/version_info.cpp +++ b/src/storage/table/version_info.cpp @@ -330,12 +330,12 @@ void VectorVersionInfo::serialize(Serializer& serializer) const { for (const auto deleted : *deletedVersions) { // Versions should be either INVALID_TRANSACTION or committed timestamps. RYU_ASSERT(deleted == INVALID_TRANSACTION || - deleted < transaction::Transaction::START_TRANSACTION_ID); + deleted < transaction::Transaction::START_TRANSACTION_ID); RYU_UNUSED(deleted); } } RYU_ASSERT(insertionStatus == InsertionStatus::NO_INSERTED || - insertionStatus == InsertionStatus::ALWAYS_INSERTED); + insertionStatus == InsertionStatus::ALWAYS_INSERTED); serializer.writeDebuggingInfo("insertion_status"); serializer.serializeValue(insertionStatus); serializer.writeDebuggingInfo("deletion_status"); @@ -365,7 +365,7 @@ std::unique_ptr VectorVersionInfo::deSerialize(Deserializer& deSer.validateDebuggingInfo(key, "insertion_status"); deSer.deserializeValue(vectorVersionInfo->insertionStatus); RYU_ASSERT(vectorVersionInfo->insertionStatus == InsertionStatus::NO_INSERTED || - vectorVersionInfo->insertionStatus == InsertionStatus::ALWAYS_INSERTED); + vectorVersionInfo->insertionStatus == InsertionStatus::ALWAYS_INSERTED); deSer.validateDebuggingInfo(key, "deletion_status"); deSer.deserializeValue(vectorVersionInfo->deletionStatus); switch (vectorVersionInfo->deletionStatus) { @@ -390,7 +390,7 @@ std::unique_ptr VectorVersionInfo::deSerialize(Deserializer& for (const auto deleted : *vectorVersionInfo->deletedVersions) { // Versions should be either INVALID_TRANSACTION or committed timestamps. RYU_ASSERT(deleted == INVALID_TRANSACTION || - deleted < transaction::Transaction::START_TRANSACTION_ID); + deleted < transaction::Transaction::START_TRANSACTION_ID); RYU_UNUSED(deleted); } } diff --git a/src/storage/wal/wal_replayer.cpp b/src/storage/wal/wal_replayer.cpp index 017ab76ad8..7aa0d3d18c 100644 --- a/src/storage/wal/wal_replayer.cpp +++ b/src/storage/wal/wal_replayer.cpp @@ -404,7 +404,7 @@ void WALReplayer::replayNodeTableInsertRecord(const WALRecord& walRecord) const const auto insertState = std::make_unique(*nodeIDVector, pkVector, propertyVectors); RYU_ASSERT(transaction::Transaction::Get(clientContext) && - transaction::Transaction::Get(clientContext)->isRecovery()); + transaction::Transaction::Get(clientContext)->isRecovery()); table.initInsertState(&clientContext, *insertState); anchorState->getSelVectorUnsafe().setToFiltered(1); for (auto i = 0u; i < numNodes; i++) { @@ -436,7 +436,7 @@ void WALReplayer::replayRelTableInsertRecord(const WALRecord& walRecord) const { *insertionRecord.ownedVectors[LOCAL_BOUND_NODE_ID_COLUMN_ID], *insertionRecord.ownedVectors[LOCAL_NBR_NODE_ID_COLUMN_ID], propertyVectors); RYU_ASSERT(transaction::Transaction::Get(clientContext) && - transaction::Transaction::Get(clientContext)->isRecovery()); + transaction::Transaction::Get(clientContext)->isRecovery()); for (auto i = 0u; i < numRels; i++) { anchorState->getSelVectorUnsafe()[0] = i; table.initInsertState(&clientContext, *insertState); @@ -457,7 +457,7 @@ void WALReplayer::replayNodeDeletionRecord(const WALRecord& walRecord) const { const auto deleteState = std::make_unique(*nodeIDVector, *deletionRecord.ownedPKVector); RYU_ASSERT(transaction::Transaction::Get(clientContext) && - transaction::Transaction::Get(clientContext)->isRecovery()); + transaction::Transaction::Get(clientContext)->isRecovery()); table.delete_(transaction::Transaction::Get(clientContext), *deleteState); } @@ -474,7 +474,7 @@ void WALReplayer::replayNodeUpdateRecord(const WALRecord& walRecord) const { const auto updateState = std::make_unique(updateRecord.columnID, *nodeIDVector, *updateRecord.ownedPropertyVector); RYU_ASSERT(transaction::Transaction::Get(clientContext) && - transaction::Transaction::Get(clientContext)->isRecovery()); + transaction::Transaction::Get(clientContext)->isRecovery()); table.update(transaction::Transaction::Get(clientContext), *updateState); } @@ -488,7 +488,7 @@ void WALReplayer::replayRelDeletionRecord(const WALRecord& walRecord) const { std::make_unique(*deletionRecord.ownedSrcNodeIDVector, *deletionRecord.ownedDstNodeIDVector, *deletionRecord.ownedRelIDVector); RYU_ASSERT(transaction::Transaction::Get(clientContext) && - transaction::Transaction::Get(clientContext)->isRecovery()); + transaction::Transaction::Get(clientContext)->isRecovery()); table.delete_(transaction::Transaction::Get(clientContext), *deleteState); } @@ -497,7 +497,7 @@ void WALReplayer::replayRelDetachDeletionRecord(const WALRecord& walRecord) cons const auto tableID = deletionRecord.tableID; auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); RYU_ASSERT(transaction::Transaction::Get(clientContext) && - transaction::Transaction::Get(clientContext)->isRecovery()); + transaction::Transaction::Get(clientContext)->isRecovery()); const auto anchorState = deletionRecord.ownedSrcNodeIDVector->state; RYU_ASSERT(anchorState->getSelVector().getSelSize() == 1); const auto dstNodeIDVector = @@ -517,14 +517,14 @@ void WALReplayer::replayRelUpdateRecord(const WALRecord& walRecord) const { auto& table = StorageManager::Get(clientContext)->getTable(tableID)->cast(); const auto anchorState = updateRecord.ownedRelIDVector->state; RYU_ASSERT(anchorState == updateRecord.ownedSrcNodeIDVector->state && - anchorState == updateRecord.ownedSrcNodeIDVector->state && - anchorState == updateRecord.ownedPropertyVector->state); + anchorState == updateRecord.ownedSrcNodeIDVector->state && + anchorState == updateRecord.ownedPropertyVector->state); RYU_ASSERT(anchorState->getSelVector().getSelSize() == 1); const auto updateState = std::make_unique(updateRecord.columnID, *updateRecord.ownedSrcNodeIDVector, *updateRecord.ownedDstNodeIDVector, *updateRecord.ownedRelIDVector, *updateRecord.ownedPropertyVector); RYU_ASSERT(transaction::Transaction::Get(clientContext) && - transaction::Transaction::Get(clientContext)->isRecovery()); + transaction::Transaction::Get(clientContext)->isRecovery()); table.update(transaction::Transaction::Get(clientContext), *updateState); } diff --git a/tools/shell/include/printer/printer.h b/tools/shell/include/printer/printer.h index 20f03020ef..65acd1f7a4 100644 --- a/tools/shell/include/printer/printer.h +++ b/tools/shell/include/printer/printer.h @@ -106,7 +106,7 @@ struct BaseTablePrinter : public Printer { bool Types = true; protected: - explicit BaseTablePrinter(PrinterType pt) : Printer(pt){}; + explicit BaseTablePrinter(PrinterType pt) : Printer(pt) {}; }; struct BoxPrinter : public BaseTablePrinter { From ae0f8153ea2b32a8c3723ebf6bfb4666ee8f0981 Mon Sep 17 00:00:00 2001 From: Saksham Agrawal <40560369+saksham115@users.noreply.github.com> Date: Mon, 8 Dec 2025 13:57:04 +0530 Subject: [PATCH 4/4] Fix clang-format-18 formatting (Ubuntu 24.04 version) --- extension/vector/src/include/index/hnsw_graph.h | 2 +- src/function/function_collection.cpp | 15 ++++++++------- src/include/common/data_chunk/data_chunk.h | 2 +- src/include/common/exception/binder.h | 2 +- src/include/common/exception/buffer_manager.h | 2 +- src/include/common/exception/catalog.h | 2 +- src/include/common/exception/checkpoint.h | 2 +- src/include/common/exception/connection.h | 2 +- src/include/common/exception/copy.h | 2 +- src/include/common/exception/internal.h | 2 +- src/include/common/exception/interrupt.h | 2 +- src/include/common/exception/not_implemented.h | 2 +- src/include/common/exception/parser.h | 2 +- src/include/common/exception/runtime.h | 2 +- src/include/common/exception/storage.h | 2 +- src/include/common/exception/test.h | 2 +- .../common/exception/transaction_manager.h | 2 +- src/include/common/static_vector.h | 2 +- .../optimizer/projection_push_down_optimizer.h | 2 +- .../reader/parquet/boolean_column_reader.h | 2 +- .../reader/parquet/interval_column_reader.h | 2 +- .../reader/parquet/templated_column_reader.h | 2 +- .../persistent/reader/parquet/thrift_tools.h | 2 +- .../reader/parquet/uuid_column_reader.h | 2 +- src/include/storage/page_range.h | 2 +- src/include/storage/table/column_chunk_scanner.h | 2 +- src/main/db_config.cpp | 2 +- src/storage/free_space_manager.cpp | 3 +-- tools/shell/include/printer/printer.h | 2 +- 29 files changed, 36 insertions(+), 36 deletions(-) diff --git a/extension/vector/src/include/index/hnsw_graph.h b/extension/vector/src/include/index/hnsw_graph.h index 85eaf56630..8e94043f5f 100644 --- a/extension/vector/src/include/index/hnsw_graph.h +++ b/extension/vector/src/include/index/hnsw_graph.h @@ -225,7 +225,7 @@ class CompressedNodeOffsetBuffer { struct NodeToHNSWGraphOffsetMap { explicit NodeToHNSWGraphOffsetMap(common::offset_t numNodesInTable) - : numNodesInGraph(numNodesInTable), numNodesInTable(numNodesInTable) {}; + : numNodesInGraph(numNodesInTable), numNodesInTable(numNodesInTable){}; NodeToHNSWGraphOffsetMap(common::offset_t numNodesInTable, const common::NullMask* selectedNodes); diff --git a/src/function/function_collection.cpp b/src/function/function_collection.cpp index 5567641914..3a64d0e518 100644 --- a/src/function/function_collection.cpp +++ b/src/function/function_collection.cpp @@ -36,22 +36,23 @@ namespace ryu { namespace function { #define SCALAR_FUNCTION_BASE(_PARAM, _NAME) \ - {_PARAM::getFunctionSet, _NAME, CatalogEntryType::SCALAR_FUNCTION_ENTRY} + { _PARAM::getFunctionSet, _NAME, CatalogEntryType::SCALAR_FUNCTION_ENTRY } #define SCALAR_FUNCTION(_PARAM) SCALAR_FUNCTION_BASE(_PARAM, _PARAM::name) #define SCALAR_FUNCTION_ALIAS(_PARAM) SCALAR_FUNCTION_BASE(_PARAM::alias, _PARAM::name) #define REWRITE_FUNCTION_BASE(_PARAM, _NAME) \ - {_PARAM::getFunctionSet, _NAME, CatalogEntryType::REWRITE_FUNCTION_ENTRY} + { _PARAM::getFunctionSet, _NAME, CatalogEntryType::REWRITE_FUNCTION_ENTRY } #define REWRITE_FUNCTION(_PARAM) REWRITE_FUNCTION_BASE(_PARAM, _PARAM::name) #define REWRITE_FUNCTION_ALIAS(_PARAM) REWRITE_FUNCTION_BASE(_PARAM::alias, _PARAM::name) #define AGGREGATE_FUNCTION(_PARAM) \ - {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::AGGREGATE_FUNCTION_ENTRY} + { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::AGGREGATE_FUNCTION_ENTRY } #define EXPORT_FUNCTION(_PARAM) \ - {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::COPY_FUNCTION_ENTRY} + { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::COPY_FUNCTION_ENTRY } #define TABLE_FUNCTION(_PARAM) \ - {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::TABLE_FUNCTION_ENTRY} + { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::TABLE_FUNCTION_ENTRY } #define STANDALONE_TABLE_FUNCTION(_PARAM) \ - {_PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::STANDALONE_TABLE_FUNCTION_ENTRY} -#define FINAL_FUNCTION {nullptr, nullptr, CatalogEntryType::SCALAR_FUNCTION_ENTRY} + { _PARAM::getFunctionSet, _PARAM::name, CatalogEntryType::STANDALONE_TABLE_FUNCTION_ENTRY } +#define FINAL_FUNCTION \ + { nullptr, nullptr, CatalogEntryType::SCALAR_FUNCTION_ENTRY } FunctionCollection* FunctionCollection::getFunctions() { static FunctionCollection functions[] = { diff --git a/src/include/common/data_chunk/data_chunk.h b/src/include/common/data_chunk/data_chunk.h index 205400df86..34ca1bec03 100644 --- a/src/include/common/data_chunk/data_chunk.h +++ b/src/include/common/data_chunk/data_chunk.h @@ -21,7 +21,7 @@ class RYU_API DataChunk { public: DataChunk() : DataChunk{0} {} explicit DataChunk(uint32_t numValueVectors) - : DataChunk(numValueVectors, std::make_shared()) {}; + : DataChunk(numValueVectors, std::make_shared()){}; DataChunk(uint32_t numValueVectors, const std::shared_ptr& state) : valueVectors(numValueVectors), state{state} {}; diff --git a/src/include/common/exception/binder.h b/src/include/common/exception/binder.h index e01fb8bb52..92b6a7c84e 100644 --- a/src/include/common/exception/binder.h +++ b/src/include/common/exception/binder.h @@ -8,7 +8,7 @@ namespace common { class RYU_API BinderException : public Exception { public: - explicit BinderException(const std::string& msg) : Exception("Binder exception: " + msg) {}; + explicit BinderException(const std::string& msg) : Exception("Binder exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/buffer_manager.h b/src/include/common/exception/buffer_manager.h index 243cf23f62..7c8d21ee79 100644 --- a/src/include/common/exception/buffer_manager.h +++ b/src/include/common/exception/buffer_manager.h @@ -9,7 +9,7 @@ namespace common { class RYU_API BufferManagerException : public Exception { public: explicit BufferManagerException(const std::string& msg) - : Exception("Buffer manager exception: " + msg) {}; + : Exception("Buffer manager exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/catalog.h b/src/include/common/exception/catalog.h index d0954db93f..6e5d4d8873 100644 --- a/src/include/common/exception/catalog.h +++ b/src/include/common/exception/catalog.h @@ -8,7 +8,7 @@ namespace common { class RYU_API CatalogException : public Exception { public: - explicit CatalogException(const std::string& msg) : Exception("Catalog exception: " + msg) {}; + explicit CatalogException(const std::string& msg) : Exception("Catalog exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/checkpoint.h b/src/include/common/exception/checkpoint.h index a902b5e076..24d3e2e09a 100644 --- a/src/include/common/exception/checkpoint.h +++ b/src/include/common/exception/checkpoint.h @@ -8,7 +8,7 @@ namespace common { class RYU_API CheckpointException : public Exception { public: - explicit CheckpointException(const std::exception& e) : Exception(e.what()) {}; + explicit CheckpointException(const std::exception& e) : Exception(e.what()){}; }; } // namespace common diff --git a/src/include/common/exception/connection.h b/src/include/common/exception/connection.h index 14db98c950..66f97b77b0 100644 --- a/src/include/common/exception/connection.h +++ b/src/include/common/exception/connection.h @@ -9,7 +9,7 @@ namespace common { class RYU_API ConnectionException : public Exception { public: explicit ConnectionException(const std::string& msg) - : Exception("Connection exception: " + msg) {}; + : Exception("Connection exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/copy.h b/src/include/common/exception/copy.h index bf7247816c..14f24fb90c 100644 --- a/src/include/common/exception/copy.h +++ b/src/include/common/exception/copy.h @@ -8,7 +8,7 @@ namespace common { class RYU_API CopyException : public Exception { public: - explicit CopyException(const std::string& msg) : Exception("Copy exception: " + msg) {}; + explicit CopyException(const std::string& msg) : Exception("Copy exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/internal.h b/src/include/common/exception/internal.h index a830108f9e..1d33d58c7e 100644 --- a/src/include/common/exception/internal.h +++ b/src/include/common/exception/internal.h @@ -8,7 +8,7 @@ namespace common { class RYU_API InternalException : public Exception { public: - explicit InternalException(const std::string& msg) : Exception(msg) {}; + explicit InternalException(const std::string& msg) : Exception(msg){}; }; } // namespace common diff --git a/src/include/common/exception/interrupt.h b/src/include/common/exception/interrupt.h index d37c8d3cc3..7ae43a83f1 100644 --- a/src/include/common/exception/interrupt.h +++ b/src/include/common/exception/interrupt.h @@ -8,7 +8,7 @@ namespace common { class RYU_API InterruptException : public Exception { public: - explicit InterruptException() : Exception("Interrupted.") {}; + explicit InterruptException() : Exception("Interrupted."){}; }; } // namespace common diff --git a/src/include/common/exception/not_implemented.h b/src/include/common/exception/not_implemented.h index dbb822f0d2..3f0d99468c 100644 --- a/src/include/common/exception/not_implemented.h +++ b/src/include/common/exception/not_implemented.h @@ -8,7 +8,7 @@ namespace common { class RYU_API NotImplementedException : public Exception { public: - explicit NotImplementedException(const std::string& msg) : Exception(msg) {}; + explicit NotImplementedException(const std::string& msg) : Exception(msg){}; }; } // namespace common diff --git a/src/include/common/exception/parser.h b/src/include/common/exception/parser.h index 198b387d7f..9578488ec3 100644 --- a/src/include/common/exception/parser.h +++ b/src/include/common/exception/parser.h @@ -10,7 +10,7 @@ class RYU_API ParserException : public Exception { public: static constexpr const char* ERROR_PREFIX = "Parser exception: "; - explicit ParserException(const std::string& msg) : Exception(ERROR_PREFIX + msg) {}; + explicit ParserException(const std::string& msg) : Exception(ERROR_PREFIX + msg){}; }; } // namespace common diff --git a/src/include/common/exception/runtime.h b/src/include/common/exception/runtime.h index 7110bd5367..e516621dd8 100644 --- a/src/include/common/exception/runtime.h +++ b/src/include/common/exception/runtime.h @@ -8,7 +8,7 @@ namespace common { class RYU_API RuntimeException : public Exception { public: - explicit RuntimeException(const std::string& msg) : Exception("Runtime exception: " + msg) {}; + explicit RuntimeException(const std::string& msg) : Exception("Runtime exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/storage.h b/src/include/common/exception/storage.h index 662fa5d17f..bb2be91f2b 100644 --- a/src/include/common/exception/storage.h +++ b/src/include/common/exception/storage.h @@ -8,7 +8,7 @@ namespace common { class RYU_API StorageException : public Exception { public: - explicit StorageException(const std::string& msg) : Exception("Storage exception: " + msg) {}; + explicit StorageException(const std::string& msg) : Exception("Storage exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/test.h b/src/include/common/exception/test.h index 1726e36891..2484ab6196 100644 --- a/src/include/common/exception/test.h +++ b/src/include/common/exception/test.h @@ -7,7 +7,7 @@ namespace common { class TestException : public Exception { public: - explicit TestException(const std::string& msg) : Exception("Test exception: " + msg) {}; + explicit TestException(const std::string& msg) : Exception("Test exception: " + msg){}; }; } // namespace common diff --git a/src/include/common/exception/transaction_manager.h b/src/include/common/exception/transaction_manager.h index 6d2bc0a853..725f74afe4 100644 --- a/src/include/common/exception/transaction_manager.h +++ b/src/include/common/exception/transaction_manager.h @@ -8,7 +8,7 @@ namespace common { class RYU_API TransactionManagerException : public Exception { public: - explicit TransactionManagerException(const std::string& msg) : Exception(msg) {}; + explicit TransactionManagerException(const std::string& msg) : Exception(msg){}; }; } // namespace common diff --git a/src/include/common/static_vector.h b/src/include/common/static_vector.h index 7c58e48bb6..a38aa3016c 100644 --- a/src/include/common/static_vector.h +++ b/src/include/common/static_vector.h @@ -29,7 +29,7 @@ class StaticVector { } public: - StaticVector() : len(0) {}; + StaticVector() : len(0){}; StaticVector(StaticVector&& other) : len(other.len) { std::uninitialized_move(other.begin(), other.end(), begin()); other.len = 0; diff --git a/src/include/optimizer/projection_push_down_optimizer.h b/src/include/optimizer/projection_push_down_optimizer.h index 0500642e47..58d4a7e011 100644 --- a/src/include/optimizer/projection_push_down_optimizer.h +++ b/src/include/optimizer/projection_push_down_optimizer.h @@ -25,7 +25,7 @@ namespace optimizer { class ProjectionPushDownOptimizer : public LogicalOperatorVisitor { public: void rewrite(planner::LogicalPlan* plan); - explicit ProjectionPushDownOptimizer(common::PathSemantic semantic) : semantic(semantic) {}; + explicit ProjectionPushDownOptimizer(common::PathSemantic semantic) : semantic(semantic){}; private: void visitOperator(planner::LogicalOperator* op); diff --git a/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h index 8021cda1d8..7ba83a1d31 100644 --- a/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/boolean_column_reader.h @@ -18,7 +18,7 @@ class BooleanColumnReader : public TemplatedColumnReader(reader, std::move(type), schema, schemaIdx, maxDefine, maxRepeat), - bytePos(0) {}; + bytePos(0){}; uint8_t bytePos; diff --git a/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h index aacc3c8c11..e2ab53405f 100644 --- a/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/interval_column_reader.h @@ -30,7 +30,7 @@ class IntervalColumnReader const ryu_parquet::format::SchemaElement& schema, uint64_t fileIdx, uint64_t maxDefine, uint64_t maxRepeat) : TemplatedColumnReader(reader, - std::move(type), schema, fileIdx, maxDefine, maxRepeat) {}; + std::move(type), schema, fileIdx, maxDefine, maxRepeat){}; protected: void dictionary(const std::shared_ptr& dictionaryData, diff --git a/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h index f5568f6555..841a30b823 100644 --- a/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/templated_column_reader.h @@ -31,7 +31,7 @@ class TemplatedColumnReader : public ColumnReader { TemplatedColumnReader(ParquetReader& reader, common::LogicalType type, const ryu_parquet::format::SchemaElement& schema, uint64_t schemaIdx, uint64_t maxDefine, uint64_t maxRepeat) - : ColumnReader(reader, std::move(type), schema, schemaIdx, maxDefine, maxRepeat) {}; + : ColumnReader(reader, std::move(type), schema, schemaIdx, maxDefine, maxRepeat){}; std::shared_ptr dict; diff --git a/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h b/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h index c40d39d8b9..97add6065f 100644 --- a/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h +++ b/src/include/processor/operator/persistent/reader/parquet/thrift_tools.h @@ -12,7 +12,7 @@ namespace processor { // A ReadHead for prefetching data in a specific range struct ReadHead { - ReadHead(uint64_t location, uint64_t size) : location(location), size(size) {}; + ReadHead(uint64_t location, uint64_t size) : location(location), size(size){}; // Hint info uint64_t location; uint64_t size; diff --git a/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h b/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h index e7705de5bf..87149d08a6 100644 --- a/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h +++ b/src/include/processor/operator/persistent/reader/parquet/uuid_column_reader.h @@ -28,7 +28,7 @@ class UUIDColumnReader : public TemplatedColumnReader(reader, std::move(dataType), - schema_p, file_idx_p, maxDefine, maxRepeat) {}; + schema_p, file_idx_p, maxDefine, maxRepeat){}; protected: void dictionary(const std::shared_ptr& dictionaryData, diff --git a/src/include/storage/page_range.h b/src/include/storage/page_range.h index 7787d1f138..bbdf62dce7 100644 --- a/src/include/storage/page_range.h +++ b/src/include/storage/page_range.h @@ -5,7 +5,7 @@ namespace ryu::storage { struct PageRange { - PageRange() : startPageIdx(common::INVALID_PAGE_IDX), numPages(0) {}; + PageRange() : startPageIdx(common::INVALID_PAGE_IDX), numPages(0){}; PageRange(common::page_idx_t startPageIdx, common::page_idx_t numPages) : startPageIdx(startPageIdx), numPages(numPages) {} diff --git a/src/include/storage/table/column_chunk_scanner.h b/src/include/storage/table/column_chunk_scanner.h index 70104f0204..c5ef30c550 100644 --- a/src/include/storage/table/column_chunk_scanner.h +++ b/src/include/storage/table/column_chunk_scanner.h @@ -15,7 +15,7 @@ struct ColumnChunkScanner { using scan_func_t = std::function; - virtual ~ColumnChunkScanner() {}; + virtual ~ColumnChunkScanner(){}; virtual void scanSegment(common::offset_t offsetInSegment, common::offset_t segmentLength, scan_func_t scanFunc) = 0; virtual void applyCommittedUpdates(const UpdateInfo& updateInfo, diff --git a/src/main/db_config.cpp b/src/main/db_config.cpp index 399636ccd0..0c3592e01f 100644 --- a/src/main/db_config.cpp +++ b/src/main/db_config.cpp @@ -10,7 +10,7 @@ namespace ryu { namespace main { #define GET_CONFIGURATION(_PARAM) \ - {_PARAM::name, _PARAM::inputType, _PARAM::setContext, _PARAM::getSetting} + { _PARAM::name, _PARAM::inputType, _PARAM::setContext, _PARAM::getSetting } static ConfigurationOption options[] = { // NOLINT(cert-err58-cpp): GET_CONFIGURATION(ThreadsSetting), GET_CONFIGURATION(TimeoutSetting), diff --git a/src/storage/free_space_manager.cpp b/src/storage/free_space_manager.cpp index d9bc50e9c3..c6bb07b37e 100644 --- a/src/storage/free_space_manager.cpp +++ b/src/storage/free_space_manager.cpp @@ -18,8 +18,7 @@ static FreeSpaceManager::sorted_free_list_t& getFreeList( return freeLists[level]; } -FreeSpaceManager::FreeSpaceManager() - : freeLists{}, numEntries(0), needClearEvictedEntries(false) {}; +FreeSpaceManager::FreeSpaceManager() : freeLists{}, numEntries(0), needClearEvictedEntries(false){}; common::idx_t FreeSpaceManager::getLevel(common::page_idx_t numPages) { // level is exponent of largest power of 2 that is <= numPages diff --git a/tools/shell/include/printer/printer.h b/tools/shell/include/printer/printer.h index 65acd1f7a4..20f03020ef 100644 --- a/tools/shell/include/printer/printer.h +++ b/tools/shell/include/printer/printer.h @@ -106,7 +106,7 @@ struct BaseTablePrinter : public Printer { bool Types = true; protected: - explicit BaseTablePrinter(PrinterType pt) : Printer(pt) {}; + explicit BaseTablePrinter(PrinterType pt) : Printer(pt){}; }; struct BoxPrinter : public BaseTablePrinter {