DRILL-366, DRILL-364: Small fixes due to merge issues
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/d90d5b16 Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/d90d5b16 Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/d90d5b16 Branch: refs/heads/master Commit: d90d5b165ee3bdb072a8101a3b0acfb8c930c935 Parents: 7716c7e Author: Jacques Nadeau <jacq...@apache.org> Authored: Sun Feb 23 17:37:21 2014 -0800 Committer: Jacques Nadeau <jacq...@apache.org> Committed: Mon Mar 3 23:22:17 2014 -0800 ---------------------------------------------------------------------- .../compile/sig/ConstantExpressionIdentifier.java | 1 + .../drill/exec/store/dfs/easy/EasyGroupScan.java | 1 + .../drill/exec/physical/impl/TestCastFunctions.java | 2 +- .../exec/physical/impl/TestCastVarCharToBigInt.java | 2 +- .../resources/functions/cast/testCastVarCharNull.json | 14 ++++---------- .../functions/cast/test_cast_varchar_to_bigint.json | 14 ++++---------- 6 files changed, 12 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d90d5b16/exec/java-exec/src/main/java/org/apache/drill/exec/compile/sig/ConstantExpressionIdentifier.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/sig/ConstantExpressionIdentifier.java b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/sig/ConstantExpressionIdentifier.java index 4d07a8c..7a48112 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/sig/ConstantExpressionIdentifier.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/sig/ConstantExpressionIdentifier.java @@ -26,6 +26,7 @@ import org.apache.drill.common.expression.FunctionCall; import org.apache.drill.common.expression.IfExpression; import org.apache.drill.common.expression.LogicalExpression; import org.apache.drill.common.expression.SchemaPath; +import org.apache.drill.common.expression.ValueExpressions; import org.apache.drill.common.expression.ValueExpressions.BooleanExpression; import org.apache.drill.common.expression.ValueExpressions.DoubleExpression; import org.apache.drill.common.expression.ValueExpressions.LongExpression; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d90d5b16/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyGroupScan.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyGroupScan.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyGroupScan.java index 5fcf7a5..a7f556e 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyGroupScan.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyGroupScan.java @@ -74,6 +74,7 @@ public class EasyGroupScan extends AbstractGroupScan{ ) throws IOException, ExecutionSetupException { this.formatPlugin = (EasyFormatPlugin<?>) engineRegistry.getFormatPlugin(storageConfig, formatConfig); + Preconditions.checkNotNull(formatPlugin, "Unable to load format plugin for provided format config."); this.selection = new FileSelection(files, true); this.maxWidth = selection.getFileStatusList(formatPlugin.getFileSystem()).size(); this.ref = ref; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d90d5b16/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java index 4d18815..0659e5b 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java @@ -393,7 +393,7 @@ public class TestCastFunctions extends PopUnitTestBase{ client.connect(); List<QueryResultBatch> results = client.runQuery(UserProtos.QueryType.PHYSICAL, - Files.toString(FileUtils.getResourceAsFile("/functions/cast/testCastVarCharNull.json"), Charsets.UTF_8).replace("#{TEST_FILE}", FileUtils.getResourceAsFile("/jsoninput/input1.json").toURI().toString())); + Files.toString(FileUtils.getResourceAsFile("/functions/cast/testCastVarCharNull.json"), Charsets.UTF_8).replace("#{TEST_FILE}", "/jsoninput/input1.json")); QueryResultBatch batch = results.get(0); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d90d5b16/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java index ba8b9da..ac8e5c6 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java @@ -78,7 +78,7 @@ public class TestCastVarCharToBigInt extends PopUnitTestBase { client.connect(); List<QueryResultBatch> results = client.runQuery(UserProtos.QueryType.PHYSICAL, Files.toString(FileUtils.getResourceAsFile("/functions/cast/test_cast_varchar_to_bigint.json"), Charsets.UTF_8) - .replace("#{TEST_FILE}", FileUtils.getResourceAsFile("/scan_json_test_cast.json").toURI().toString()) + .replace("#{TEST_FILE}", "/scan_json_test_cast.json") ); RecordBatchLoader batchLoader = new RecordBatchLoader(bit.getContext().getAllocator()); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d90d5b16/exec/java-exec/src/test/resources/functions/cast/testCastVarCharNull.json ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/resources/functions/cast/testCastVarCharNull.json b/exec/java-exec/src/test/resources/functions/cast/testCastVarCharNull.json index 030b696..3ca7ed6 100644 --- a/exec/java-exec/src/test/resources/functions/cast/testCastVarCharNull.json +++ b/exec/java-exec/src/test/resources/functions/cast/testCastVarCharNull.json @@ -9,16 +9,10 @@ graph:[ { @id:1, - pop:"json-scan", - entries: [ - { - path : "#{TEST_FILE}" - } - ], - storageengine: { - "type": "json", - "dfsName": "file:///" - } + pop:"fs-scan", + format: {type: "json"}, + storage:{type: "file", connection: "classpath:///"}, + files:["#{TEST_FILE}"] }, { @id:2, child: 1, http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d90d5b16/exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json b/exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json index 36439c5..018dbad 100644 --- a/exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json +++ b/exec/java-exec/src/test/resources/functions/cast/test_cast_varchar_to_bigint.json @@ -9,16 +9,10 @@ graph:[ { @id:1, - pop:"json-scan", - entries: [ - { - path : "#{TEST_FILE}" - } - ], - storageengine: { - "type": "json", - "dfsName": "file:///" - } + pop:"fs-scan", + format: {type: "json"}, + storage:{type: "file", connection: "classpath:///"}, + files:["#{TEST_FILE}"] }, { pop:"project",