You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2019/11/05 20:45:35 UTC

[atlas] branch branch-2.0 updated (6dc309d -> 3c0d785)

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

amestry pushed a change to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git.


    from 6dc309d  ATLAS-3490: Added headers in atlas api
     new 6562875  ATLAS-3504-DSL-query-with-like-clause-returns-unexpected-results-v1.patch
     new 3c0d785  ATLAS-3506 Add Expect 100 Continue header to Atlas Client.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java | 3 ++-
 .../src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java | 7 +++++++
 .../src/test/java/org/apache/atlas/query/DSLQueriesTest.java      | 8 ++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)


[atlas] 01/02: ATLAS-3504-DSL-query-with-like-clause-returns-unexpected-results-v1.patch

Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

amestry pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 656287589c635c6f6e7be3408a5d8049e5e6ea07
Author: nikhilbonte <ni...@freestoneinfotech.com>
AuthorDate: Tue Nov 5 15:28:51 2019 +0530

    ATLAS-3504-DSL-query-with-like-clause-returns-unexpected-results-v1.patch
    
    Signed-off-by: Ashutosh Mestry <am...@hortonworks.com>
---
 .../src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java | 7 +++++++
 .../src/test/java/org/apache/atlas/query/DSLQueriesTest.java      | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java b/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
index a272ab9..d0d7fd7 100644
--- a/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
+++ b/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java
@@ -24,6 +24,8 @@ import java.io.IOException;
 import java.io.StringReader;
 import java.io.UncheckedIOException;
 import java.lang.reflect.Constructor;
+import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.time.Instant;
@@ -1077,6 +1079,10 @@ public class Solr6Index implements IndexProvider {
         } else if (AttributeUtil.isDecimal(dataType)) {
             if (dataType.equals(Float.class)) postfix = "_f";
             else postfix = "_d";
+        } else if (dataType.equals(BigInteger.class)) {
+            postfix = "_bi";
+        } else if (dataType.equals(BigDecimal.class)) {
+            postfix = "_bd";
         } else if (dataType.equals(Geoshape.class)) {
             postfix = "_g";
         } else if (dataType.equals(Date.class) || dataType.equals(Instant.class)) {
@@ -1086,6 +1092,7 @@ public class Solr6Index implements IndexProvider {
         } else if (dataType.equals(UUID.class)) {
             postfix = "_uuid";
         } else throw new IllegalArgumentException("Unsupported data type ["+dataType+"] for field: " + key);
+
         if (keyInfo.getCardinality() == Cardinality.SET || keyInfo.getCardinality() == Cardinality.LIST) {
             postfix += "s";
         }
diff --git a/repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java b/repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java
index 36ec3d2..724ae9f 100644
--- a/repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java
+++ b/repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java
@@ -134,6 +134,14 @@ public class DSLQueriesTest extends BasicTestSetup {
     @DataProvider(name = "comparisonQueriesProvider")
     private Object[][] comparisonQueriesProvider() {
         return new Object[][] {
+                {"Person where (name = \"Julius\" )", 1},
+                {"Person where (name like \"Jul*\" )", 1},
+                {"Person where (name like \"J*\" )", 3},
+                {"Person where (name like \"*us\" )", 1},
+                {"Person where (name like \"*uli*\" )", 1},
+                {"Person where (name like \"Julius\" )", 1},
+                {"Person where (name like \"Jul\" )", 0},
+
                 {"Person where (birthday < \"1950-01-01T02:35:58.440Z\" )", 0},
                 {"Person where (birthday > \"1975-01-01T02:35:58.440Z\" )", 2},
                 {"Person where (birthday >= \"1975-01-01T02:35:58.440Z\" )", 2},


[atlas] 02/02: ATLAS-3506 Add Expect 100 Continue header to Atlas Client.

Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

amestry pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 3c0d7857c0b528e489cada665e64dc4fad20ec81
Author: Mukund Thakur <mt...@hortonworks.com>
AuthorDate: Tue Nov 5 16:05:26 2019 +0530

    ATLAS-3506 Add Expect 100 Continue header to Atlas Client.
    
    Signed-off-by: Ashutosh Mestry <am...@hortonworks.com>
---
 client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java b/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java
index d617002..e3d2ebc 100644
--- a/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java
+++ b/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java
@@ -372,7 +372,8 @@ public abstract class AtlasBaseClient {
             // Set content headers
             requestBuilder
                     .accept(api.getProduces())
-                    .type(api.getConsumes());
+                    .type(api.getConsumes())
+                    .header("Expect", "100-continue");
 
             // Set cookie if present
             if (cookie != null) {