You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by ma...@apache.org on 2016/01/05 03:55:30 UTC
calcite git commit: [CALCITE-1030] Json ModelHandler calling
SchemaPlus.setCacheEnabled() causes UnsupportedOperationException when using
SimpleCalciteSchema
Repository: calcite
Updated Branches:
refs/heads/master 05fbd126b -> 39f505fa9
[CALCITE-1030] Json ModelHandler calling SchemaPlus.setCacheEnabled() causes UnsupportedOperationException when using SimpleCalciteSchema
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/39f505fa
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/39f505fa
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/39f505fa
Branch: refs/heads/master
Commit: 39f505fa9def053be54b548c030acb3e3973aa02
Parents: 05fbd12
Author: maryannxue <ma...@gmail.com>
Authored: Mon Jan 4 21:55:12 2016 -0500
Committer: maryannxue <ma...@gmail.com>
Committed: Mon Jan 4 21:55:12 2016 -0500
----------------------------------------------------------------------
core/src/main/java/org/apache/calcite/model/ModelHandler.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/39f505fa/core/src/main/java/org/apache/calcite/model/ModelHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/model/ModelHandler.java b/core/src/main/java/org/apache/calcite/model/ModelHandler.java
index 02e12fe..6b04a91 100644
--- a/core/src/main/java/org/apache/calcite/model/ModelHandler.java
+++ b/core/src/main/java/org/apache/calcite/model/ModelHandler.java
@@ -195,8 +195,9 @@ public class ModelHandler {
}
private void populateSchema(JsonSchema jsonSchema, SchemaPlus schema) {
- boolean cache = jsonSchema.cache == null || jsonSchema.cache;
- schema.setCacheEnabled(cache);
+ if (jsonSchema.cache != null) {
+ schema.setCacheEnabled(jsonSchema.cache);
+ }
final Pair<String, SchemaPlus> pair = Pair.of(jsonSchema.name, schema);
push(schemaStack, pair);
jsonSchema.visitChildren(this);