Re: [PR] [CALCITE-6275] Parser for data types ignores element nullability in collections [calcite]

2024-02-21 Thread via GitHub


mihaibudiu commented on code in PR #3698:
URL: https://github.com/apache/calcite/pull/3698#discussion_r1498109879


##
server/src/test/java/org/apache/calcite/test/ServerParserTest.java:
##
@@ -116,6 +115,30 @@ class ServerParserTest extends SqlParserTest {
 .ok("CREATE TABLE `X` (`I` INTEGER NOT NULL, `J` VARCHAR(5))");
   }
 
+  /**
+   * Test case for https://issues.apache.org/jira/browse/CALCITE-6275;>[CALCITE-6275]
+   * Parser for data types ignores element nullability in collections. */
+  @Test void testCreateTableWithArray() {
+sql("create table x ("
++ "a int array, "
++ "b int array not null, "
++ "c int not null array, "
++ "d int not null array not null, "
++ "e int array null, " // same as column a
++ "f int null array null, " // same as column a
++ "g int null array not null, " // same as column b
++ "h int not null array null)") // same as column c
+.ok("CREATE TABLE `X` ("
++ "`A` INTEGER ARRAY, "
++ "`B` INTEGER ARRAY NOT NULL, "
++ "`C` INTEGER NOT NULL ARRAY, "

Review Comment:
   you are right, it does not seem to be supported.
   I will discuss this topic in the JIRA.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [CALCITE-6275] Parser for data types ignores element nullability in collections [calcite]

2024-02-21 Thread via GitHub


YiwenWu commented on code in PR #3698:
URL: https://github.com/apache/calcite/pull/3698#discussion_r1497598755


##
server/src/test/java/org/apache/calcite/test/ServerParserTest.java:
##
@@ -116,6 +115,30 @@ class ServerParserTest extends SqlParserTest {
 .ok("CREATE TABLE `X` (`I` INTEGER NOT NULL, `J` VARCHAR(5))");
   }
 
+  /**
+   * Test case for https://issues.apache.org/jira/browse/CALCITE-6275;>[CALCITE-6275]
+   * Parser for data types ignores element nullability in collections. */
+  @Test void testCreateTableWithArray() {
+sql("create table x ("
++ "a int array, "
++ "b int array not null, "
++ "c int not null array, "
++ "d int not null array not null, "
++ "e int array null, " // same as column a
++ "f int null array null, " // same as column a
++ "g int null array not null, " // same as column b
++ "h int not null array null)") // same as column c
+.ok("CREATE TABLE `X` ("
++ "`A` INTEGER ARRAY, "
++ "`B` INTEGER ARRAY NOT NULL, "
++ "`C` INTEGER NOT NULL ARRAY, "

Review Comment:
   Is  `INTEGER NOT NULL ARRAY`supported in Postgresql?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [CALCITE-6275] Parser for data types ignores element nullability in collections [calcite]

2024-02-20 Thread via GitHub


sonarcloud[bot] commented on PR #3698:
URL: https://github.com/apache/calcite/pull/3698#issuecomment-1955828181

   ## [![Quality Gate 
Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png
 'Quality Gate 
Passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3698) 
**Quality Gate passed**  
   Issues  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [1 New 
issue](https://sonarcloud.io/project/issues?id=apache_calcite=3698=false=true)
   
   Measures  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3698=false=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [59.5% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_calcite=3698=new_coverage=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0.0% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_calcite=3698=new_duplicated_lines_density=list)
  
 
   [See analysis details on 
SonarCloud](https://sonarcloud.io/dashboard?id=apache_calcite=3698)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org