You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by dz...@apache.org on 2023/02/21 08:06:03 UTC

[drill-site] 01/02: Document the need for a default format when querying an empty dir.

This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git

commit d6ef361c7f12ca671b6eaf10135c011ea3fb71fe
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Mon Feb 20 16:32:53 2023 +0200

    Document the need for a default format when querying an empty dir.
---
 .../010-data-sources-and-file-formats-introduction.md               | 6 +++++-
 _docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md              | 5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/_docs/en/data-sources-and-file-formats/010-data-sources-and-file-formats-introduction.md b/_docs/en/data-sources-and-file-formats/010-data-sources-and-file-formats-introduction.md
index a38347b7f..7b86f6f31 100644
--- a/_docs/en/data-sources-and-file-formats/010-data-sources-and-file-formats-introduction.md
+++ b/_docs/en/data-sources-and-file-formats/010-data-sources-and-file-formats-introduction.md
@@ -49,7 +49,10 @@ You set the input format for data coming from data sources to Drill in the works
 You change one of the `store` properties in the [sys.options table]({{ site.baseurl }}/docs/configuration-options-introduction/) to set the output format of Drill data. The default storage format for Drill CREATE TABLE AS (CTAS) statements is Parquet.
 
 ## Schemaless Tables
-As of Drill 1.13, Drill supports queries on empty directories. Empty directories are directories that exist, but do not contain files. Currently, an empty directory in Drill is a Drill table without a schema, or a “schemaless” table. An empty directory with Parquet metadata cache files is also a schemaless table in Drill.
+
+**Introduced in release: 1.13**
+
+Drill supports queries on empty directories i.e. directories that exist but do not contain files.  In Drill 1.21 the constraint that the enclosing workspace must have a default format set for a query against an empty directory to be considered valid was added. Currently, an empty directory in Drill is a Drill table without a schema, or a “schemaless” table. An empty directory with Parquet metadata cache files is also a schemaless table in Drill.
 
 Drill supports queries with JOIN and UNION [ALL] operators on empty directories. For example, if you issue the following queries with the UNION ALL operator, Drill queries the empty directory (empty_DIR) as a schemaless table and returns results for the query on the right side of the operator:
 
@@ -57,6 +60,7 @@ Drill supports queries with JOIN and UNION [ALL] operators on empty directories.
 
 ### Usage Notes
 
+- Drill 1.21 and later: if the workspace configuration specifies no default format, i.e. `"defaultInputFormat": null`, then queries on an empty directory fail with a `VALIDATION ERROR`.
 - Queries with stars (*) on an empty directory return an empty result set.
 - Fields indicated in the SELECT statement are returned as INT-OPTIONAL types.
 - The empty directory in a query with the UNION operator does not change the results; Drill returns results as if the query does not contain the UNION operator.
diff --git a/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md b/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
index ae50136e0..81df2bf84 100644
--- a/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
+++ b/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
@@ -87,7 +87,7 @@ where
 
 `drillbit=<node name>` specifies one or more host names or IP addresses of cluster nodes running Drill.
 
-### `tries` Parameter
+### The `tries` Parameter
 
 As of Drill 1.10, you can include the optional `tries=<value>` parameter in the connection string, as shown in the following URL:
 
@@ -153,4 +153,5 @@ try (
   while (ctasResults.next()); // scroll through results to ensure that we wait for CTAS completion
 }
 ```
-      
+
+See also: the `exec.query.return_result_set_for_ddl` config option.