@@ -525,10 +525,10 @@ private void clusterAndIndexAsLookupIndexPattern(String clusterAndIndex) {
525525
526526 public void testInvalidCharacterInIndexPattern () {
527527 Map <String , String > commands = new HashMap <>();
528- commands .put ("FROM {}" , "line 1:7 : " );
528+ commands .put ("FROM {}" , "line 1:6 : " );
529529 if (Build .current ().isSnapshot ()) {
530- commands .put ("METRICS {}" , "line 1:10 : " );
531- commands .put ("ROW x = 1 | LOOKUP_🐔 {} ON j" , "line 1:23 : " );
530+ commands .put ("METRICS {}" , "line 1:9 : " );
531+ commands .put ("ROW x = 1 | LOOKUP_🐔 {} ON j" , "line 1:22 : " );
532532 }
533533 String lineNumber ;
534534 for (String command : commands .keySet ()) {
@@ -572,7 +572,7 @@ public void testInvalidCharacterInIndexPattern() {
572572 continue ;
573573 }
574574
575- lineNumber = command .contains ("FROM" ) ? "line 1:21 : " : "line 1:24 : " ;
575+ lineNumber = command .contains ("FROM" ) ? "line 1:20 : " : "line 1:23 : " ;
576576 expectInvalidIndexNameErrorWithLineNumber (command , "indexpattern, --indexpattern" , lineNumber , "-indexpattern" );
577577 expectInvalidIndexNameErrorWithLineNumber (command , "indexpattern, \" --indexpattern\" " , lineNumber , "-indexpattern" );
578578 expectInvalidIndexNameErrorWithLineNumber (command , "\" indexpattern, --indexpattern\" " , commands .get (command ), "-indexpattern" );
@@ -585,7 +585,7 @@ public void testInvalidCharacterInIndexPattern() {
585585 if (command .contains ("LOOKUP_🐔" )) {
586586 continue ;
587587 }
588- lineNumber = command .contains ("FROM" ) ? "line 1:10 : " : "line 1:13 : " ;
588+ lineNumber = command .contains ("FROM" ) ? "line 1:9 : " : "line 1:12 : " ;
589589 clustersAndIndices (command , "*" , "-index#pattern" );
590590 clustersAndIndices (command , "index*" , "-index#pattern" );
591591 clustersAndIndices (command , "*" , "-<--logstash-{now/M{yyyy.MM}}>" );
@@ -885,18 +885,18 @@ public void testSuggestAvailableProcessingCommandsOnParsingError() {
885885 public void testDeprecatedIsNullFunction () {
886886 expectError (
887887 "from test | eval x = is_null(f)" ,
888- "line 1:23 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
888+ "line 1:22 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
889889 );
890890 expectError (
891891 "row x = is_null(f)" ,
892- "line 1:10 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
892+ "line 1:9 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
893893 );
894894
895895 if (Build .current ().isSnapshot ()) {
896896 expectError (
897897 "from test | eval x = ?fn1(f)" ,
898898 List .of (paramAsIdentifier ("fn1" , "IS_NULL" )),
899- "line 1:23 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
899+ "line 1:22 : is_null function is not supported anymore, please use 'is null'/'is not null' predicates instead"
900900 );
901901 }
902902 }
@@ -911,23 +911,23 @@ public void testMetadataFieldOnOtherSources() {
911911 }
912912
913913 public void testMetadataFieldMultipleDeclarations () {
914- expectError ("from test metadata _index, _version, _index" , "1:39 : metadata field [_index] already declared [@1:20]" );
914+ expectError ("from test metadata _index, _version, _index" , "1:38 : metadata field [_index] already declared [@1:20]" );
915915 }
916916
917917 public void testMetadataFieldUnsupportedPrimitiveType () {
918- expectError ("from test metadata _tier" , "line 1:21 : unsupported metadata field [_tier]" );
918+ expectError ("from test metadata _tier" , "line 1:20 : unsupported metadata field [_tier]" );
919919 }
920920
921921 public void testMetadataFieldUnsupportedCustomType () {
922- expectError ("from test metadata _feature" , "line 1:21 : unsupported metadata field [_feature]" );
922+ expectError ("from test metadata _feature" , "line 1:20 : unsupported metadata field [_feature]" );
923923 }
924924
925925 public void testMetadataFieldNotFoundNonExistent () {
926- expectError ("from test metadata _doesnot_compute" , "line 1:21 : unsupported metadata field [_doesnot_compute]" );
926+ expectError ("from test metadata _doesnot_compute" , "line 1:20 : unsupported metadata field [_doesnot_compute]" );
927927 }
928928
929929 public void testMetadataFieldNotFoundNormalField () {
930- expectError ("from test metadata emp_no" , "line 1:21 : unsupported metadata field [emp_no]" );
930+ expectError ("from test metadata emp_no" , "line 1:20 : unsupported metadata field [emp_no]" );
931931 }
932932
933933 public void testDissectPattern () {
@@ -985,13 +985,13 @@ public void testGrokPattern() {
985985
986986 expectError (
987987 "row a = \" foo bar\" | GROK a \" %{NUMBER:foo} %{WORD:foo}\" " ,
988- "line 1:22 : Invalid GROK pattern [%{NUMBER:foo} %{WORD:foo}]:"
988+ "line 1:21 : Invalid GROK pattern [%{NUMBER:foo} %{WORD:foo}]:"
989989 + " the attribute [foo] is defined multiple times with different types"
990990 );
991991
992992 expectError (
993993 "row a = \" foo\" | GROK a \" (?P<justification>.+)\" " ,
994- "line 1:18 : Invalid grok pattern [(?P<justification>.+)]: [undefined group option]"
994+ "line 1:17 : Invalid grok pattern [(?P<justification>.+)]: [undefined group option]"
995995 );
996996 }
997997
@@ -1015,7 +1015,7 @@ public void testLikeRLike() {
10151015
10161016 expectError (
10171017 "from a | where foo like \" (?i)(^|[^a-zA-Z0-9_-])nmap($|\\ \\ .)\" " ,
1018- "line 1:17 : Invalid pattern for LIKE [(?i)(^|[^a-zA-Z0-9_-])nmap($|\\ .)]: "
1018+ "line 1:16 : Invalid pattern for LIKE [(?i)(^|[^a-zA-Z0-9_-])nmap($|\\ .)]: "
10191019 + "[Invalid sequence - escape character is not followed by special wildcard char]"
10201020 );
10211021 }
@@ -1076,7 +1076,7 @@ public void testEnrich() {
10761076 );
10771077 expectError (
10781078 "from a | enrich typo:countries on foo" ,
1079- "line 1:18 : Unrecognized value [typo], ENRICH policy qualifier needs to be one of [_ANY, _COORDINATOR, _REMOTE]"
1079+ "line 1:17 : Unrecognized value [typo], ENRICH policy qualifier needs to be one of [_ANY, _COORDINATOR, _REMOTE]"
10801080 );
10811081 }
10821082
@@ -1261,8 +1261,8 @@ public void testInvalidPositionalParams() {
12611261 expectError (
12621262 "from test | where x < ?0 and y < ?2" ,
12631263 List .of (paramAsConstant (null , 5 )),
1264- "line 1:24 : No parameter is defined for position 0, did you mean position 1?; "
1265- + "line 1:35 : No parameter is defined for position 2, did you mean position 1?"
1264+ "line 1:23 : No parameter is defined for position 0, did you mean position 1?; "
1265+ + "line 1:34 : No parameter is defined for position 2, did you mean position 1?"
12661266 );
12671267
12681268 expectError (
@@ -2107,11 +2107,11 @@ public void testEnrichOnMatchField() {
21072107 }
21082108
21092109 public void testInlineConvertWithNonexistentType () {
2110- expectError ("ROW 1::doesnotexist" , "line 1:9 : Unknown data type named [doesnotexist]" );
2111- expectError ("ROW \" 1\" ::doesnotexist" , "line 1:11 : Unknown data type named [doesnotexist]" );
2112- expectError ("ROW false::doesnotexist" , "line 1:13 : Unknown data type named [doesnotexist]" );
2113- expectError ("ROW abs(1)::doesnotexist" , "line 1:14 : Unknown data type named [doesnotexist]" );
2114- expectError ("ROW (1+2)::doesnotexist" , "line 1:13 : Unknown data type named [doesnotexist]" );
2110+ expectError ("ROW 1::doesnotexist" , "line 1:8 : Unknown data type named [doesnotexist]" );
2111+ expectError ("ROW \" 1\" ::doesnotexist" , "line 1:10 : Unknown data type named [doesnotexist]" );
2112+ expectError ("ROW false::doesnotexist" , "line 1:12 : Unknown data type named [doesnotexist]" );
2113+ expectError ("ROW abs(1)::doesnotexist" , "line 1:13 : Unknown data type named [doesnotexist]" );
2114+ expectError ("ROW (1+2)::doesnotexist" , "line 1:12 : Unknown data type named [doesnotexist]" );
21152115 }
21162116
21172117 public void testLookup () {
@@ -2131,7 +2131,7 @@ public void testLookup() {
21312131 }
21322132
21332133 public void testInlineConvertUnsupportedType () {
2134- expectError ("ROW 3::BYTE" , "line 1:6 : Unsupported conversion to type [BYTE]" );
2134+ expectError ("ROW 3::BYTE" , "line 1:5 : Unsupported conversion to type [BYTE]" );
21352135 }
21362136
21372137 public void testMetricsWithoutStats () {
0 commit comments