File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383 with :
8484 fetch-depth : 0
8585 - name : SonarCloud Scan
86- uses : SonarSource/sonarqube-scan-action@v4 .1.0
86+ uses : SonarSource/sonarqube-scan-action@v5 .1.0
8787 env :
8888 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change @@ -225,12 +225,12 @@ class Tokens:
225225 # Common token definition
226226 TABLE_NAME = (
227227 Opt (KeyWords .SUPPRESS_QUOTE )
228- + Word (alphanums + "-_<> " )("table" ).set_name ("table" )
228+ + Word (alphanums + "-_. " )("table" ).set_name ("table" )
229229 + Opt (KeyWords .SUPPRESS_QUOTE )
230230 )
231231 ATTRIBUTE_NAME = (
232232 Opt (KeyWords .SUPPRESS_QUOTE )
233- + Word (alphanums + "-_" )("attribute_name" ).set_name ("attribute_name" )
233+ + Word (alphanums + "-_. " )("attribute_name" ).set_name ("attribute_name" )
234234 + Opt (KeyWords .SUPPRESS_QUOTE )
235235 )
236236 DATA_TYPE = one_of ("NUMERIC STRING BINARY" , caseless = True )("data_type" ).set_name (
@@ -244,7 +244,7 @@ class Tokens:
244244 ).set_name ("key_type" )
245245 INDEX_NAME = (
246246 Opt (KeyWords .SUPPRESS_QUOTE )
247- + Word (alphanums + "_ " )("index_name" ).set_name ("index_name" )
247+ + Word (alphanums + "-_. " )("index_name" ).set_name ("index_name" )
248248 + Opt (KeyWords .SUPPRESS_QUOTE )
249249 )
250250 INDEX_TYPE = one_of ("GLOBAL LOCAL" , caseless = True )("index_type" ).set_name (
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def test_parse_simple_case_1(self):
2020 SELECT * FROM Issues.CreateDateIndex
2121 """
2222 ret = SQLParser (sql ).transform ()
23- assert ret == {"Statement" : 'SELECT * FROM "Issues"." CreateDateIndex"' }
23+ assert ret == {"Statement" : 'SELECT * FROM "Issues. CreateDateIndex"' }
2424
2525 sql = """
2626 SELECT * FROM "Issues"."CreateDateIndex"
@@ -339,3 +339,16 @@ def test_parse_partiql_functions(self):
339339 assert parser .parser .where_conditions [6 ] == "size('Title') <= 20"
340340 assert parser .parser .where_conditions [7 ] == "AND"
341341 assert parser .parser .where_conditions [8 ] == "CreatedDate IS MISSING"
342+
343+ def test_parse_dot_in_table_name (self ):
344+ sql = """
345+ SELECT * FROM "Pub.Issues"."CreateDateIndex"
346+ """
347+ ret = SQLParser (sql ).transform ()
348+ assert ret == {"Statement" : 'SELECT * FROM "Pub.Issues"."CreateDateIndex"' }
349+
350+ sql = """
351+ SELECT att1, att2 FROM "This.Pub.Issues"."Index.CreateDateIndex"
352+ """
353+ ret = SQLParser (sql ).transform ()
354+ assert ret == {"Statement" : 'SELECT att1,att2 FROM "This.Pub.Issues"."Index.CreateDateIndex"' }
You can’t perform that action at this time.
0 commit comments