@@ -516,10 +516,10 @@ private void clusterAndIndexAsLookupIndexPattern(String clusterAndIndex) {
516516
517517 public void testInvalidCharacterInIndexPattern () {
518518 Map <String , String > commands = new HashMap <>();
519- commands .put ("FROM {}" , "line 1:7 : " );
519+ commands .put ("FROM {}" , "line 1:6 : " );
520520 if (Build .current ().isSnapshot ()) {
521- commands .put ("METRICS {}" , "line 1:10 : " );
522- commands .put ("ROW x = 1 | LOOKUP {} ON j" , "line 1:21 : " );
521+ commands .put ("METRICS {}" , "line 1:9 : " );
522+ commands .put ("ROW x = 1 | LOOKUP {} ON j" , "line 1:20 : " );
523523 }
524524 String lineNumber ;
525525 for (String command : commands .keySet ()) {
@@ -563,7 +563,7 @@ public void testInvalidCharacterInIndexPattern() {
563563 continue ;
564564 }
565565
566- lineNumber = command .contains ("FROM" ) ? "line 1:21 : " : "line 1:24 : " ;
566+ lineNumber = command .contains ("FROM" ) ? "line 1:20 : " : "line 1:23 : " ;
567567 expectInvalidIndexNameErrorWithLineNumber (command , "indexpattern, --indexpattern" , lineNumber , "-indexpattern" );
568568 expectInvalidIndexNameErrorWithLineNumber (command , "indexpattern, \" --indexpattern\" " , lineNumber , "-indexpattern" );
569569 expectInvalidIndexNameErrorWithLineNumber (command , "\" indexpattern, --indexpattern\" " , commands .get (command ), "-indexpattern" );
@@ -576,7 +576,7 @@ public void testInvalidCharacterInIndexPattern() {
576576 if (command .contains ("LOOKUP" )) {
577577 continue ;
578578 }
579- lineNumber = command .contains ("FROM" ) ? "line 1:10 : " : "line 1:13 : " ;
579+ lineNumber = command .contains ("FROM" ) ? "line 1:9 : " : "line 1:12 : " ;
580580 clustersAndIndices (command , "*" , "-index#pattern" );
581581 clustersAndIndices (command , "index*" , "-index#pattern" );
582582 clustersAndIndices (command , "*" , "-<--logstash-{now/M{yyyy.MM}}>" );
@@ -876,18 +876,18 @@ public void testSuggestAvailableProcessingCommandsOnParsingError() {
876876 public void testDeprecatedIsNullFunction () {
877877 expectError (
878878 "from test | eval x = is_null(f)" ,
879- "line 1:23 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
879+ "line 1:22 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
880880 );
881881 expectError (
882882 "row x = is_null(f)" ,
883- "line 1:10 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
883+ "line 1:9 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
884884 );
885885
886886 if (Build .current ().isSnapshot ()) {
887887 expectError (
888888 "from test | eval x = ?fn1(f)" ,
889889 List .of (paramAsIdentifier ("fn1" , "IS_NULL" )),
890- "line 1:23 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
890+ "line 1:22 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
891891 );
892892 }
893893 }
@@ -902,23 +902,23 @@ public void testMetadataFieldOnOtherSources() {
902902 }
903903
904904 public void testMetadataFieldMultipleDeclarations () {
905- expectError ("from test metadata _index, _version, _index" , "1:39 : metadata field [_index] already declared [@1:20]" );
905+ expectError ("from test metadata _index, _version, _index" , "1:38 : metadata field [_index] already declared [@1:20]" );
906906 }
907907
908908 public void testMetadataFieldUnsupportedPrimitiveType () {
909- expectError ("from test metadata _tier" , "line 1:21 : unsupported metadata field [_tier]" );
909+ expectError ("from test metadata _tier" , "line 1:20 : unsupported metadata field [_tier]" );
910910 }
911911
912912 public void testMetadataFieldUnsupportedCustomType () {
913- expectError ("from test metadata _feature" , "line 1:21 : unsupported metadata field [_feature]" );
913+ expectError ("from test metadata _feature" , "line 1:20 : unsupported metadata field [_feature]" );
914914 }
915915
916916 public void testMetadataFieldNotFoundNonExistent () {
917- expectError ("from test metadata _doesnot_compute" , "line 1:21 : unsupported metadata field [_doesnot_compute]" );
917+ expectError ("from test metadata _doesnot_compute" , "line 1:20 : unsupported metadata field [_doesnot_compute]" );
918918 }
919919
920920 public void testMetadataFieldNotFoundNormalField () {
921- expectError ("from test metadata emp_no" , "line 1:21 : unsupported metadata field [emp_no]" );
921+ expectError ("from test metadata emp_no" , "line 1:20 : unsupported metadata field [emp_no]" );
922922 }
923923
924924 public void testDissectPattern () {
@@ -976,13 +976,13 @@ public void testGrokPattern() {
976976
977977 expectError (
978978 "row a = \" foo bar\" | GROK a \" %{NUMBER:foo} %{WORD:foo}\" " ,
979- "line 1:22 : Invalid GROK pattern [%{NUMBER:foo} %{WORD:foo}]:"
979+ "line 1:21 : Invalid GROK pattern [%{NUMBER:foo} %{WORD:foo}]:"
980980 + " the attribute [foo] is defined multiple times with different types"
981981 );
982982
983983 expectError (
984984 "row a = \" foo\" | GROK a \" (?P<justification>.+)\" " ,
985- "line 1:18 : Invalid grok pattern [(?P<justification>.+)]: [undefined group option]"
985+ "line 1:17 : Invalid grok pattern [(?P<justification>.+)]: [undefined group option]"
986986 );
987987 }
988988
@@ -1006,7 +1006,7 @@ public void testLikeRLike() {
10061006
10071007 expectError (
10081008 "from a | where foo like \" (?i)(^|[^a-zA-Z0-9_-])nmap($|\\ \\ .)\" " ,
1009- "line 1:17 : Invalid pattern for LIKE [(?i)(^|[^a-zA-Z0-9_-])nmap($|\\ .)]: "
1009+ "line 1:16 : Invalid pattern for LIKE [(?i)(^|[^a-zA-Z0-9_-])nmap($|\\ .)]: "
10101010 + "[Invalid sequence - escape character is not followed by special wildcard char]"
10111011 );
10121012 }
@@ -1067,7 +1067,7 @@ public void testEnrich() {
10671067 );
10681068 expectError (
10691069 "from a | enrich typo:countries on foo" ,
1070- "line 1:18 : Unrecognized value [typo], ENRICH policy qualifier needs to be one of [_ANY, _COORDINATOR, _REMOTE]"
1070+ "line 1:17 : Unrecognized value [typo], ENRICH policy qualifier needs to be one of [_ANY, _COORDINATOR, _REMOTE]"
10711071 );
10721072 }
10731073
@@ -1252,8 +1252,8 @@ public void testInvalidPositionalParams() {
12521252 expectError (
12531253 "from test | where x < ?0 and y < ?2" ,
12541254 List .of (paramAsConstant (null , 5 )),
1255- "line 1:24 : No parameter is defined for position 0, did you mean position 1?; "
1256- + "line 1:35 : No parameter is defined for position 2, did you mean position 1?"
1255+ "line 1:23 : No parameter is defined for position 0, did you mean position 1?; "
1256+ + "line 1:34 : No parameter is defined for position 2, did you mean position 1?"
12571257 );
12581258
12591259 expectError (
@@ -2098,11 +2098,11 @@ public void testEnrichOnMatchField() {
20982098 }
20992099
21002100 public void testInlineConvertWithNonexistentType () {
2101- expectError ("ROW 1::doesnotexist" , "line 1:9 : Unknown data type named [doesnotexist]" );
2102- expectError ("ROW \" 1\" ::doesnotexist" , "line 1:11 : Unknown data type named [doesnotexist]" );
2103- expectError ("ROW false::doesnotexist" , "line 1:13 : Unknown data type named [doesnotexist]" );
2104- expectError ("ROW abs(1)::doesnotexist" , "line 1:14 : Unknown data type named [doesnotexist]" );
2105- expectError ("ROW (1+2)::doesnotexist" , "line 1:13 : Unknown data type named [doesnotexist]" );
2101+ expectError ("ROW 1::doesnotexist" , "line 1:8 : Unknown data type named [doesnotexist]" );
2102+ expectError ("ROW \" 1\" ::doesnotexist" , "line 1:10 : Unknown data type named [doesnotexist]" );
2103+ expectError ("ROW false::doesnotexist" , "line 1:12 : Unknown data type named [doesnotexist]" );
2104+ expectError ("ROW abs(1)::doesnotexist" , "line 1:13 : Unknown data type named [doesnotexist]" );
2105+ expectError ("ROW (1+2)::doesnotexist" , "line 1:12 : Unknown data type named [doesnotexist]" );
21062106 }
21072107
21082108 public void testLookup () {
@@ -2122,7 +2122,7 @@ public void testLookup() {
21222122 }
21232123
21242124 public void testInlineConvertUnsupportedType () {
2125- expectError ("ROW 3::BYTE" , "line 1:6 : Unsupported conversion to type [BYTE]" );
2125+ expectError ("ROW 3::BYTE" , "line 1:5 : Unsupported conversion to type [BYTE]" );
21262126 }
21272127
21282128 public void testMetricsWithoutStats () {
0 commit comments