X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fftacmp%2Fanalyze_fta.cc;h=d793577a162068446eddb49536321b088fb2905f;hb=eb761d89890df8d74532dd4faad118db18fd3b7d;hp=8c9fd3b3fb744ad25a374b79762b79f0e9b2ab10;hpb=3ff5c433efcaee8b01fbeed90ab848008f2e6278;p=com%2Fgs-lite.git diff --git a/src/ftacmp/analyze_fta.cc b/src/ftacmp/analyze_fta.cc index 8c9fd3b..d793577 100644 --- a/src/ftacmp/analyze_fta.cc +++ b/src/ftacmp/analyze_fta.cc @@ -283,6 +283,10 @@ int verify_colref(scalarexp_t *se, tablevar_list_t *fm, cr->set_interface(""); cr->set_table_name(fm->get_tablevar_name(table_var)); + if(! schema->contains_field(cr->get_schema_ref(), field)){ + fprintf(stderr, "Error, field %s is not in stream %s\n", field.c_str(), schema->get_table_name( cr->get_schema_ref() ).c_str()); + return -1; + } type_name = schema->get_type_name(cr->get_schema_ref(), field); param_list *modifiers = schema->get_modifier_list(cr->get_schema_ref(), field); @@ -4116,7 +4120,7 @@ query_summary_class *analyze_fta(table_exp_t *fta_tree, table_list *schema, // Require explicit INNER_JOIN, ... specification for join queries. if(jprop < 0){ if(qs->query_type != MERGE_QUERY && tbl_vec.size() > 1){ - fprintf(stderr,"ERROR, a join query must specify one of INNER_JOIM, OUTER_JOIN, LEFT_OUTER_JOIN, RIGHT_OUTER_JOIN, FILTER_JOIN.\n"); + fprintf(stderr,"ERROR, a join query must specify one of INNER_JOIM, OUTER_JOIN, LEFT_OUTER_JOIN, RIGHT_OUTER_JOIN, WATCHLIST_JOIN, FILTER_JOIN.\n"); return(NULL); } } @@ -4130,7 +4134,7 @@ query_summary_class *analyze_fta(table_exp_t *fta_tree, table_list *schema, tbl_vec[tbl_vec.size()-1]->set_property(1); if(jprop == FILTER_JOIN_PROPERTY){ if(fta_tree->get_from()->get_temporal_range() == 0){ - fprintf(stderr,"ERROR, a filter join must have a non-zero tempoal range.\n"); + fprintf(stderr,"ERROR, a filter join must have a non-zero temporal range.\n"); return NULL; } if(tbl_vec.size() != 2){ @@ -4150,12 +4154,13 @@ query_summary_class *analyze_fta(table_exp_t *fta_tree, table_list *schema, string type_name = schema->get_type_name(tbl_vec[0]->get_schema_ref(),field); param_list *modifiers = schema->get_modifier_list(cr->get_schema_ref(), field); data_type *dt0 = new data_type(type_name, modifiers); - if(dt0->get_type_str() != "UINT"){ - fprintf(stderr,"ERROR, the temporal attribute in a filter join must be a UINT.\n"); + string dt0_type = dt0->get_type_str(); + if(dt0_type != "INT" && dt0_type != "UINT" && dt0_type != "LLONG" && dt0_type != "ULLONG"){ + fprintf(stderr,"ERROR, the temporal attribute in a filter join must be one of INT/UINT/LLONG/ULLONG.\n"); return NULL; } if(! dt0->is_increasing()){ - fprintf(stderr,"ERROR, the temporal attribtue in a filter join must be temporal increasing.\n"); + fprintf(stderr,"ERROR, the temporal attribute in a filter join must be temporal increasing.\n"); return NULL; } } @@ -4190,6 +4195,12 @@ query_summary_class *analyze_fta(table_exp_t *fta_tree, table_list *schema, // unpack the param table to a global for easier analysis. param_tbl=qs->param_tbl; + +////////////////// WATCHLIST specialized analysis + if(qs->query_type == WATCHLIST_QUERY){ +// Populate a SELECT clause? + } + ////////////////// MERGE specialized analysis if(qs->query_type == MERGE_QUERY){