This is an automated email from the ASF dual-hosted git repository.
htowaileb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new b2a48e4 ASTERIXDB-2993: Proper error message for "parquet" on
datalake and gcs
b2a48e4 is described below
commit b2a48e473da64f66243f7b2c07b4aea1d2759605
Author: Hussain Towaileb <[email protected]>
AuthorDate: Thu Dec 2 20:16:41 2021 +0300
ASTERIXDB-2993: Proper error message for "parquet" on datalake and gcs
Details:
- Parquet format external datasets are not supported for azure
datalake and google cloud storage, this change ensure
failing with a proper error message.
Change-Id: Id178275eec09d64582149f33d1f8e9c0cf79fc4a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14303
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Hussain Towaileb <[email protected]>
Reviewed-by: Murtadha Hubail <[email protected]>
---
.../apache/asterix/external/util/ExternalDataUtils.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
index 5194dae..d1f740e 100644
---
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
+++
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
@@ -21,6 +21,7 @@ package org.apache.asterix.external.util;
import static com.google.cloud.storage.Storage.BlobListOption;
import static java.nio.charset.StandardCharsets.UTF_8;
import static
org.apache.asterix.common.exceptions.ErrorCode.EXTERNAL_SOURCE_ERROR;
+import static
org.apache.asterix.common.exceptions.ErrorCode.INVALID_REQ_PARAM_VAL;
import static
org.apache.asterix.common.exceptions.ErrorCode.PARAMETERS_NOT_ALLOWED_AT_SAME_TIME;
import static
org.apache.asterix.common.exceptions.ErrorCode.PARAMETERS_REQUIRED;
import static
org.apache.asterix.common.exceptions.ErrorCode.PARAM_NOT_ALLOWED_IF_PARAM_IS_PRESENT;
@@ -58,6 +59,7 @@ import static
org.apache.asterix.external.util.ExternalDataConstants.KEY_DELIMIT
import static
org.apache.asterix.external.util.ExternalDataConstants.KEY_ESCAPE;
import static
org.apache.asterix.external.util.ExternalDataConstants.KEY_EXCLUDE;
import static
org.apache.asterix.external.util.ExternalDataConstants.KEY_EXTERNAL_SCAN_BUFFER_SIZE;
+import static
org.apache.asterix.external.util.ExternalDataConstants.KEY_FORMAT;
import static
org.apache.asterix.external.util.ExternalDataConstants.KEY_INCLUDE;
import static org.apache.asterix.external.util.ExternalDataConstants.KEY_QUOTE;
import static
org.apache.asterix.external.util.ExternalDataConstants.KEY_RECORD_END;
@@ -1675,6 +1677,12 @@ public class ExternalDataUtils {
throw new CompilationException(ErrorCode.PARAMETERS_REQUIRED,
srcLoc, ExternalDataConstants.KEY_FORMAT);
}
+ // parquet is not supported for azure datalake
+ if (isParquetFormat(configuration)) {
+ throw new CompilationException(INVALID_REQ_PARAM_VAL, srcLoc,
KEY_FORMAT,
+ configuration.get(KEY_FORMAT));
+ }
+
validateIncludeExclude(configuration);
// Check if the bucket is present
@@ -1786,6 +1794,12 @@ public class ExternalDataUtils {
throw new CompilationException(ErrorCode.PARAMETERS_REQUIRED,
srcLoc, ExternalDataConstants.KEY_FORMAT);
}
+ // parquet is not supported for google cloud storage
+ if (isParquetFormat(configuration)) {
+ throw new CompilationException(INVALID_REQ_PARAM_VAL, srcLoc,
KEY_FORMAT,
+ configuration.get(KEY_FORMAT));
+ }
+
validateIncludeExclude(configuration);
String container =
configuration.get(ExternalDataConstants.CONTAINER_NAME_FIELD_NAME);