You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jiangzhx (via GitHub)" <gi...@apache.org> on 2023/04/17 10:43:10 UTC

[GitHub] [arrow-datafusion] jiangzhx opened a new pull request, #6031: Minor: port more create_drop table tests to sqllogictests

jiangzhx opened a new pull request, #6031:
URL: https://github.com/apache/arrow-datafusion/pull/6031

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   # Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] waynexia commented on pull request #6031: Minor: port more create_drop table tests to sqllogictests

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on PR #6031:
URL: https://github.com/apache/arrow-datafusion/pull/6031#issuecomment-1512353694

   link to #4495


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jiangzhx commented on a diff in pull request #6031: Minor: port more create_drop table tests to sqllogictests

Posted by "jiangzhx (via GitHub)" <gi...@apache.org>.
jiangzhx commented on code in PR #6031:
URL: https://github.com/apache/arrow-datafusion/pull/6031#discussion_r1168769214


##########
datafusion/core/tests/sqllogictests/test_files/ddl.slt:
##########
@@ -580,4 +601,4 @@ select * from t;
 0 years 0 mons 5 days 0 hours 0 mins 0.000000003 secs 1
 
 statement ok
-drop table t;
+drop table t;

Review Comment:
   thanks



-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb commented on pull request #6031: Minor: port more create_drop table tests to sqllogictests

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6031:
URL: https://github.com/apache/arrow-datafusion/pull/6031#issuecomment-1516256024

   Thank you all!


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb merged pull request #6031: Minor: port more create_drop table tests to sqllogictests

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #6031:
URL: https://github.com/apache/arrow-datafusion/pull/6031


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] waynexia commented on a diff in pull request #6031: Minor: port more create_drop table tests to sqllogictests

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on code in PR #6031:
URL: https://github.com/apache/arrow-datafusion/pull/6031#discussion_r1168633003


##########
datafusion/core/tests/sqllogictests/test_files/ddl.slt:
##########
@@ -580,4 +601,4 @@ select * from t;
 0 years 0 mons 5 days 0 hours 0 mins 0.000000003 secs 1
 
 statement ok
-drop table t;
+drop table t;

Review Comment:
   nit: add empty line
   ```suggestion
   drop table t;
   
   ```



##########
datafusion/core/tests/sql/create_drop.rs:
##########
@@ -21,90 +21,6 @@ use datafusion::test_util::TestTableFactory;
 
 use super::*;
 
-#[tokio::test]
-async fn sql_create_table_if_not_exists() -> Result<()> {
-    // the information schema used to introduce cyclic Arcs
-    let ctx =
-        SessionContext::with_config(SessionConfig::new().with_information_schema(true));
-
-    // Create table
-    ctx.sql("CREATE TABLE y AS VALUES (1,2,3)")
-        .await?
-        .collect()
-        .await?;
-
-    // Create table again
-    let result = ctx
-        .sql("CREATE TABLE IF NOT EXISTS y AS VALUES (1,2,3)")
-        .await?
-        .collect()
-        .await?;
-
-    assert_eq!(result, Vec::new());

Review Comment:
   These cases are covered by existing slt :+1: 



##########
datafusion/core/tests/sqllogictests/test_files/ddl.slt:
##########
@@ -448,6 +448,16 @@ CREATE TABLE table_without_values(field1 BIGINT NULL, field2 BIGINT NULL);
 statement ok
 CREATE TABLE IF NOT EXISTS table_without_values(field1 BIGINT, field2 BIGINT);
 
+statement ok
+CREATE EXTERNAL TABLE aggregate_simple STORED AS CSV WITH HEADER ROW LOCATION 'tests/data/aggregate_simple.csv'
+
+statement ok
+CREATE EXTERNAL TABLE IF NOT EXISTS aggregate_simple STORED AS CSV WITH HEADER ROW LOCATION 'tests/data/aggregate_simple.csv'

Review Comment:
   According to the previous cases I think we need to create this table again without `IF NOT EXIST` and expect an error



-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] jiangzhx commented on a diff in pull request #6031: Minor: port more create_drop table tests to sqllogictests

Posted by "jiangzhx (via GitHub)" <gi...@apache.org>.
jiangzhx commented on code in PR #6031:
URL: https://github.com/apache/arrow-datafusion/pull/6031#discussion_r1168806855


##########
datafusion/core/tests/sqllogictests/test_files/ddl.slt:
##########
@@ -448,6 +448,16 @@ CREATE TABLE table_without_values(field1 BIGINT NULL, field2 BIGINT NULL);
 statement ok
 CREATE TABLE IF NOT EXISTS table_without_values(field1 BIGINT, field2 BIGINT);
 
+statement ok
+CREATE EXTERNAL TABLE aggregate_simple STORED AS CSV WITH HEADER ROW LOCATION 'tests/data/aggregate_simple.csv'
+
+statement ok
+CREATE EXTERNAL TABLE IF NOT EXISTS aggregate_simple STORED AS CSV WITH HEADER ROW LOCATION 'tests/data/aggregate_simple.csv'

Review Comment:
   fixed,thanks again.
   `CREATE EXTERNAL TABLE`  
   need to check recreate the same EXTERNAL table



-- 
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: github-unsubscribe@arrow.apache.org

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