Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-1354

finding euclidean distance, square euclidean distance rounding the precision value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.0
    • 3.0
    • .NET
    • Security Level: Public
    • None
    • 5

    Description

      CBL-2.8.0-153
      late seen: It is been failing from last release.
      SG version: 2.7.0-166 or 2.8.0-374
      SG config:
      {
      "SSLCert": "sg_cert.pem",
      "SSLKey": "sg_privkey.pem",
      "adminInterface": "0.0.0.0:4985",
      "compressResponses": false,
      "databases": {
      "db": {
      "allow_conflicts": false,
      "bucket": "travel-sample",
      "delta_sync":

      { "enabled": true }

      ,
      "enable_shared_bucket_access": true,
      "import_docs": true,
      "num_index_replicas": 0,
      "password": "password",
      "server": "http://192.168.33.10:8091",
      "username": "travel-sample"
      }
      },
      "interface": ":4984",
      "logging": {
      "debug":

      { "enabled": true }

      },
      "maxFileDescriptors": 90000,
      "maxIncomingConnections": 0
      }
      }

      --Steps to reproduce:

      1. Create docs with x,y,z coordinates ex: [[3, 6, 10], [34, 23, 4]]
      2. find the euclidean distance, square euclidean distance, and cosine distance
      Expected euclidean distance: 35.86084215408221
      Actual euclidean distance :35.8608421540822

      Expected cosine distance: 0.43620415177230565
      Actual cosine distance :0.436204151772306

      • Github link for the code:

      https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_predective_queries.py#L89

      • Pytest Command:
        pytest -s --timeout 1800 --liteserv-version=2.8.0-153 --liteserv-host=localhost --liteserv-port=8080 --delta-sync --xattrs --sg-ssl --no-conflicts --enable-file-logging --sync-gateway-version=2.8.0-373 --mode=cc --server-version=6.5.1-6299 --liteserv-platform=net-uwp --create-db-per-test=cbl-test --junitxml=results/results.xml testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests -k "test_predictiveQueries_euclideanCosineDistance[coordinates5-35.86084215408221-1286-0.43620415177230565]"
      • What is the last build this test passed: always failed

      In the logs query looks like below:

       
      20:06:00.746054| [Query]: (XQuery) [Thread Pool Worker (13)] Query encoded as {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
      20:06:00.746215| [Query]: {Query#4} Compiling JSON query: {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
      20:06:00.746336| [Query]: {Query#4} Compiled as SELECT fl_result(euclidean_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'), 2)) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
      20:06:00.746532| [Query]: {QueryEnum#5} Created on {Query#4} with 1 rows (18 bytes) in 0.030ms
      20:06:00.746660| [Query]: (QueryResultSet) [Thread Pool Worker (13)] Beginning query enumeration (6000024e43d0)
      20:06:00.747111| [Query]: (QueryResultSet) [Thread Pool Worker (13)] End of query enumeration (6000024e43d0)
      20:06:00.747196| [Query]: {QueryEnum#5} Deleted
      20:06:00.750771| [Query]: (XQuery) [Thread Pool Worker (14)] Query encoded as {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
      20:06:00.750894| [Query]: {Query#6} Compiling JSON query: {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
      20:06:00.750993| [Query]: {Query#6} Compiled as SELECT fl_result(cosine_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'))) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          manasa.ghanta Manasa Ghanta (Inactive) created issue -
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Field Original Value New Value
          Affects Version/s Hydrogen [ 16189 ]
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Component/s .NET [ 15346 ]
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Description CBL-2.8.0-153
          late seen: It is been failing from last release.
          SG version: 2.7.0-166 or 2.8.0-374
          SG config:
           {
                  "SSLCert": "sg_cert.pem",
                  "SSLKey": "sg_privkey.pem",
                  "adminInterface": "0.0.0.0:4985",
                  "compressResponses": false,
                  "databases": {
                      "db": {
                          "allow_conflicts": false,
                          "bucket": "travel-sample",
                          "delta_sync": {
                              "enabled": true
                          },
                          "enable_shared_bucket_access": true,
                          "import_docs": true,
                          "num_index_replicas": 0,
                          "password": "password",
                          "server": "http://192.168.33.10:8091",
                          "username": "travel-sample"
                      }
                  },
                  "interface": ":4984",
                  "logging": {
                      "debug": {
                          "enabled": true
                      }
                  },
                  "maxFileDescriptors": 90000,
                  "maxIncomingConnections": 0
              }
          }


          Steps to reporduce:


          1. Create docs with x,y,z coordinates ex: [[3, 6, 10], [34, 23, 4]]
          2. find the euclidean distance, square euclidean distance, and cosine distance
          Expected : 35.86084215408221
          Actual: 35.8608421540822



          In the logs query looks like below:
          {code:java}

          20:06:00.746054| [Query]: (XQuery) [Thread Pool Worker (13)] Query encoded as {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746215| [Query]: {Query#4} Compiling JSON query: {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746336| [Query]: {Query#4} Compiled as SELECT fl_result(euclidean_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'), 2)) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          20:06:00.746532| [Query]: {QueryEnum#5} Created on {Query#4} with 1 rows (18 bytes) in 0.030ms
          20:06:00.746660| [Query]: (QueryResultSet) [Thread Pool Worker (13)] Beginning query enumeration (6000024e43d0)
          20:06:00.747111| [Query]: (QueryResultSet) [Thread Pool Worker (13)] End of query enumeration (6000024e43d0)
          20:06:00.747196| [Query]: {QueryEnum#5} Deleted
          20:06:00.750771| [Query]: (XQuery) [Thread Pool Worker (14)] Query encoded as {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750894| [Query]: {Query#6} Compiling JSON query: {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750993| [Query]: {Query#6} Compiled as SELECT fl_result(cosine_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'))) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          {code}
          CBL-2.8.0-153
          late seen: It is been failing from last release.
          SG version: 2.7.0-166 or 2.8.0-374
          SG config:
           {
                  "SSLCert": "sg_cert.pem",
                  "SSLKey": "sg_privkey.pem",
                  "adminInterface": "0.0.0.0:4985",
                  "compressResponses": false,
                  "databases": {
                      "db": {
                          "allow_conflicts": false,
                          "bucket": "travel-sample",
                          "delta_sync": {
                              "enabled": true
                          },
                          "enable_shared_bucket_access": true,
                          "import_docs": true,
                          "num_index_replicas": 0,
                          "password": "password",
                          "server": "http://192.168.33.10:8091",
                          "username": "travel-sample"
                      }
                  },
                  "interface": ":4984",
                  "logging": {
                      "debug": {
                          "enabled": true
                      }
                  },
                  "maxFileDescriptors": 90000,
                  "maxIncomingConnections": 0
              }
          }


          --Steps to reproduce:

                 1. Create docs with x,y,z coordinates ex: [[3, 6, 10], [34, 23, 4]]
                 2. find the euclidean distance, square euclidean distance, and cosine distance
                 Expected euclidean distance: 35.86084215408221
                 Actual euclidean distance: 35.8608421540822

                Expected cosine distance: 0.43620415177230565
                Actual cosine distance: 0.436204151772306


           - Github link for the code:

                             https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_predective_queries.py#L89
                  
           - Jenkins job failure link:
                            http://uberjenkins.sc.couchbase.com:8080/job/CBLITE_DOTNET-Net-windows-TestSever-Functional-XATTRS-tests/29/testReport/testsuites.CBLTester.CBL_Functional_tests.TestSetup_FunctionalTests/test_predective_queries/test_predictiveQueries_euclideanCosineDistance_coordinates5_35_86084215408221_1286_0_43620415177230565_/


              
           - Pytest Command:
                pytest -s --timeout 1800 --liteserv-version=2.8.0-153 --liteserv-host=localhost --liteserv-port=8080 --delta-sync --xattrs --sg-ssl --no-conflicts --enable-file-logging --sync-gateway-version=2.8.0-373 --mode=cc --server-version=6.5.1-6299 --liteserv-platform=net-uwp --create-db-per-test=cbl-test --junitxml=results/results.xml testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests -k "test_predictiveQueries_euclideanCosineDistance[coordinates5-35.86084215408221-1286-0.43620415177230565]"

           - What is the last build this test passed: always failed


          In the logs query looks like below:
          {code:java}

          20:06:00.746054| [Query]: (XQuery) [Thread Pool Worker (13)] Query encoded as {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746215| [Query]: {Query#4} Compiling JSON query: {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746336| [Query]: {Query#4} Compiled as SELECT fl_result(euclidean_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'), 2)) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          20:06:00.746532| [Query]: {QueryEnum#5} Created on {Query#4} with 1 rows (18 bytes) in 0.030ms
          20:06:00.746660| [Query]: (QueryResultSet) [Thread Pool Worker (13)] Beginning query enumeration (6000024e43d0)
          20:06:00.747111| [Query]: (QueryResultSet) [Thread Pool Worker (13)] End of query enumeration (6000024e43d0)
          20:06:00.747196| [Query]: {QueryEnum#5} Deleted
          20:06:00.750771| [Query]: (XQuery) [Thread Pool Worker (14)] Query encoded as {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750894| [Query]: {Query#6} Compiling JSON query: {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750993| [Query]: {Query#6} Compiled as SELECT fl_result(cosine_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'))) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          {code}
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Assignee The Lite [ cbgto ] Jim Borden [ jimb ]
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Required Mobile Fields Mandatory:
           - CBL / SG Version:
             - SG Config:
           - Steps to Reproduce:
           - Actual Result:
           - Expected Result:
           - Logs :
                SGW LOGS: sgcollect info
                CBL LOGS:
                Logcat LOGS: for Android tickets
           - Github link for the code:
           - Jenkins job failure link:
           - Pytest Command
           - What is the last build this test passed:
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Description CBL-2.8.0-153
          late seen: It is been failing from last release.
          SG version: 2.7.0-166 or 2.8.0-374
          SG config:
           {
                  "SSLCert": "sg_cert.pem",
                  "SSLKey": "sg_privkey.pem",
                  "adminInterface": "0.0.0.0:4985",
                  "compressResponses": false,
                  "databases": {
                      "db": {
                          "allow_conflicts": false,
                          "bucket": "travel-sample",
                          "delta_sync": {
                              "enabled": true
                          },
                          "enable_shared_bucket_access": true,
                          "import_docs": true,
                          "num_index_replicas": 0,
                          "password": "password",
                          "server": "http://192.168.33.10:8091",
                          "username": "travel-sample"
                      }
                  },
                  "interface": ":4984",
                  "logging": {
                      "debug": {
                          "enabled": true
                      }
                  },
                  "maxFileDescriptors": 90000,
                  "maxIncomingConnections": 0
              }
          }


          --Steps to reproduce:

                 1. Create docs with x,y,z coordinates ex: [[3, 6, 10], [34, 23, 4]]
                 2. find the euclidean distance, square euclidean distance, and cosine distance
                 Expected euclidean distance: 35.86084215408221
                 Actual euclidean distance: 35.8608421540822

                Expected cosine distance: 0.43620415177230565
                Actual cosine distance: 0.436204151772306


           - Github link for the code:

                             https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_predective_queries.py#L89
                  
           - Jenkins job failure link:
                            http://uberjenkins.sc.couchbase.com:8080/job/CBLITE_DOTNET-Net-windows-TestSever-Functional-XATTRS-tests/29/testReport/testsuites.CBLTester.CBL_Functional_tests.TestSetup_FunctionalTests/test_predective_queries/test_predictiveQueries_euclideanCosineDistance_coordinates5_35_86084215408221_1286_0_43620415177230565_/


              
           - Pytest Command:
                pytest -s --timeout 1800 --liteserv-version=2.8.0-153 --liteserv-host=localhost --liteserv-port=8080 --delta-sync --xattrs --sg-ssl --no-conflicts --enable-file-logging --sync-gateway-version=2.8.0-373 --mode=cc --server-version=6.5.1-6299 --liteserv-platform=net-uwp --create-db-per-test=cbl-test --junitxml=results/results.xml testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests -k "test_predictiveQueries_euclideanCosineDistance[coordinates5-35.86084215408221-1286-0.43620415177230565]"

           - What is the last build this test passed: always failed


          In the logs query looks like below:
          {code:java}

          20:06:00.746054| [Query]: (XQuery) [Thread Pool Worker (13)] Query encoded as {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746215| [Query]: {Query#4} Compiling JSON query: {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746336| [Query]: {Query#4} Compiled as SELECT fl_result(euclidean_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'), 2)) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          20:06:00.746532| [Query]: {QueryEnum#5} Created on {Query#4} with 1 rows (18 bytes) in 0.030ms
          20:06:00.746660| [Query]: (QueryResultSet) [Thread Pool Worker (13)] Beginning query enumeration (6000024e43d0)
          20:06:00.747111| [Query]: (QueryResultSet) [Thread Pool Worker (13)] End of query enumeration (6000024e43d0)
          20:06:00.747196| [Query]: {QueryEnum#5} Deleted
          20:06:00.750771| [Query]: (XQuery) [Thread Pool Worker (14)] Query encoded as {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750894| [Query]: {Query#6} Compiling JSON query: {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750993| [Query]: {Query#6} Compiled as SELECT fl_result(cosine_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'))) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          {code}
          CBL-2.8.0-153
          late seen: It is been failing from last release.
          SG version: 2.7.0-166 or 2.8.0-374
          SG config:
           {
                  "SSLCert": "sg_cert.pem",
                  "SSLKey": "sg_privkey.pem",
                  "adminInterface": "0.0.0.0:4985",
                  "compressResponses": false,
                  "databases": {
                      "db": {
                          "allow_conflicts": false,
                          "bucket": "travel-sample",
                          "delta_sync": {
                              "enabled": true
                          },
                          "enable_shared_bucket_access": true,
                          "import_docs": true,
                          "num_index_replicas": 0,
                          "password": "password",
                          "server": "http://192.168.33.10:8091",
                          "username": "travel-sample"
                      }
                  },
                  "interface": ":4984",
                  "logging": {
                      "debug": {
                          "enabled": true
                      }
                  },
                  "maxFileDescriptors": 90000,
                  "maxIncomingConnections": 0
              }
          }


          --Steps to reproduce:

                 1. Create docs with x,y,z coordinates ex: [[3, 6, 10], [34, 23, 4]]
                 2. find the euclidean distance, square euclidean distance, and cosine distance
                 Expected euclidean distance: 35.86084215408221
                 Actual euclidean distance: 35.8608421540822

                Expected cosine distance: 0.43620415177230565
                Actual cosine distance: 0.436204151772306


           - Github link for the code:

                             https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_predective_queries.py#L89
                  
           - Jenkins job failure link:
                            http://uberjenkins.sc.couchbase.com:8080/job/CBLITE_DOTNET-Net-windows-TestSever-Functional-XATTRS-tests/29/testReport/testsuites.CBLTester.CBL_Functional_tests.TestSetup_FunctionalTests/test_predective_queries/test_predictiveQueries_euclideanCosineDistance_coordinates5_35_86084215408221_1286_0_43620415177230565_/


              
           - Pytest Command:
                pytest -s --timeout 1800 --liteserv-version=2.8.0-153 --liteserv-host=localhost --liteserv-port=8080 --delta-sync --xattrs --sg-ssl --no-conflicts --enable-file-logging --sync-gateway-version=2.8.0-373 --mode=cc --server-version=6.5.1-6299 --liteserv-platform=net-uwp --create-db-per-test=cbl-test --junitxml=results/results.xml testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests -k "test_predictiveQueries_euclideanCosineDistance[coordinates5-35.86084215408221-1286-0.43620415177230565]"

           - What is the last build this test passed: always failed


          In the logs query looks like below:
          {code:java}

          20:06:00.746054| [Query]: (XQuery) [Thread Pool Worker (13)] Query encoded as {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746215| [Query]: {Query#4} Compiling JSON query: {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746336| [Query]: {Query#4} Compiled as SELECT fl_result(euclidean_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'), 2)) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          20:06:00.746532| [Query]: {QueryEnum#5} Created on {Query#4} with 1 rows (18 bytes) in 0.030ms
          20:06:00.746660| [Query]: (QueryResultSet) [Thread Pool Worker (13)] Beginning query enumeration (6000024e43d0)
          20:06:00.747111| [Query]: (QueryResultSet) [Thread Pool Worker (13)] End of query enumeration (6000024e43d0)
          20:06:00.747196| [Query]: {QueryEnum#5} Deleted
          20:06:00.750771| [Query]: (XQuery) [Thread Pool Worker (14)] Query encoded as {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750894| [Query]: {Query#6} Compiling JSON query: {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750993| [Query]: {Query#6} Compiled as SELECT fl_result(cosine_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'))) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          {code}
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Description CBL-2.8.0-153
          late seen: It is been failing from last release.
          SG version: 2.7.0-166 or 2.8.0-374
          SG config:
           {
                  "SSLCert": "sg_cert.pem",
                  "SSLKey": "sg_privkey.pem",
                  "adminInterface": "0.0.0.0:4985",
                  "compressResponses": false,
                  "databases": {
                      "db": {
                          "allow_conflicts": false,
                          "bucket": "travel-sample",
                          "delta_sync": {
                              "enabled": true
                          },
                          "enable_shared_bucket_access": true,
                          "import_docs": true,
                          "num_index_replicas": 0,
                          "password": "password",
                          "server": "http://192.168.33.10:8091",
                          "username": "travel-sample"
                      }
                  },
                  "interface": ":4984",
                  "logging": {
                      "debug": {
                          "enabled": true
                      }
                  },
                  "maxFileDescriptors": 90000,
                  "maxIncomingConnections": 0
              }
          }


          --Steps to reproduce:

                 1. Create docs with x,y,z coordinates ex: [[3, 6, 10], [34, 23, 4]]
                 2. find the euclidean distance, square euclidean distance, and cosine distance
                 Expected euclidean distance: 35.86084215408221
                 Actual euclidean distance: 35.8608421540822

                Expected cosine distance: 0.43620415177230565
                Actual cosine distance: 0.436204151772306


           - Github link for the code:

                             https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_predective_queries.py#L89
                  
           - Jenkins job failure link:
                            http://uberjenkins.sc.couchbase.com:8080/job/CBLITE_DOTNET-Net-windows-TestSever-Functional-XATTRS-tests/29/testReport/testsuites.CBLTester.CBL_Functional_tests.TestSetup_FunctionalTests/test_predective_queries/test_predictiveQueries_euclideanCosineDistance_coordinates5_35_86084215408221_1286_0_43620415177230565_/


              
           - Pytest Command:
                pytest -s --timeout 1800 --liteserv-version=2.8.0-153 --liteserv-host=localhost --liteserv-port=8080 --delta-sync --xattrs --sg-ssl --no-conflicts --enable-file-logging --sync-gateway-version=2.8.0-373 --mode=cc --server-version=6.5.1-6299 --liteserv-platform=net-uwp --create-db-per-test=cbl-test --junitxml=results/results.xml testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests -k "test_predictiveQueries_euclideanCosineDistance[coordinates5-35.86084215408221-1286-0.43620415177230565]"

           - What is the last build this test passed: always failed


          In the logs query looks like below:
          {code:java}

          20:06:00.746054| [Query]: (XQuery) [Thread Pool Worker (13)] Query encoded as {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746215| [Query]: {Query#4} Compiling JSON query: {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746336| [Query]: {Query#4} Compiled as SELECT fl_result(euclidean_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'), 2)) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          20:06:00.746532| [Query]: {QueryEnum#5} Created on {Query#4} with 1 rows (18 bytes) in 0.030ms
          20:06:00.746660| [Query]: (QueryResultSet) [Thread Pool Worker (13)] Beginning query enumeration (6000024e43d0)
          20:06:00.747111| [Query]: (QueryResultSet) [Thread Pool Worker (13)] End of query enumeration (6000024e43d0)
          20:06:00.747196| [Query]: {QueryEnum#5} Deleted
          20:06:00.750771| [Query]: (XQuery) [Thread Pool Worker (14)] Query encoded as {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750894| [Query]: {Query#6} Compiling JSON query: {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750993| [Query]: {Query#6} Compiled as SELECT fl_result(cosine_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'))) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          {code}
          CBL-2.8.0-153
          late seen: It is been failing from last release.
          SG version: 2.7.0-166 or 2.8.0-374
          SG config:
           {
                  "SSLCert": "sg_cert.pem",
                  "SSLKey": "sg_privkey.pem",
                  "adminInterface": "0.0.0.0:4985",
                  "compressResponses": false,
                  "databases": {
                      "db": {
                          "allow_conflicts": false,
                          "bucket": "travel-sample",
                          "delta_sync": {
                              "enabled": true
                          },
                          "enable_shared_bucket_access": true,
                          "import_docs": true,
                          "num_index_replicas": 0,
                          "password": "password",
                          "server": "http://192.168.33.10:8091",
                          "username": "travel-sample"
                      }
                  },
                  "interface": ":4984",
                  "logging": {
                      "debug": {
                          "enabled": true
                      }
                  },
                  "maxFileDescriptors": 90000,
                  "maxIncomingConnections": 0
              }
          }


          --Steps to reproduce:

                 1. Create docs with x,y,z coordinates ex: [[3, 6, 10], [34, 23, 4]]
                 2. find the euclidean distance, square euclidean distance, and cosine distance
                 Expected euclidean distance: 35.86084215408221
                 Actual euclidean distance :35.8608421540822

                Expected cosine distance: 0.43620415177230565
                Actual cosine distance :0.436204151772306


           - Github link for the code:

                             https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_predective_queries.py#L89
                  
           - Jenkins job failure link:
                            http://uberjenkins.sc.couchbase.com:8080/job/CBLITE_DOTNET-Net-windows-TestSever-Functional-XATTRS-tests/29/testReport/testsuites.CBLTester.CBL_Functional_tests.TestSetup_FunctionalTests/test_predective_queries/test_predictiveQueries_euclideanCosineDistance_coordinates5_35_86084215408221_1286_0_43620415177230565_/


              
           - Pytest Command:
                pytest -s --timeout 1800 --liteserv-version=2.8.0-153 --liteserv-host=localhost --liteserv-port=8080 --delta-sync --xattrs --sg-ssl --no-conflicts --enable-file-logging --sync-gateway-version=2.8.0-373 --mode=cc --server-version=6.5.1-6299 --liteserv-platform=net-uwp --create-db-per-test=cbl-test --junitxml=results/results.xml testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests -k "test_predictiveQueries_euclideanCosineDistance[coordinates5-35.86084215408221-1286-0.43620415177230565]"

           - What is the last build this test passed: always failed


          In the logs query looks like below:
          {code:java}

          20:06:00.746054| [Query]: (XQuery) [Thread Pool Worker (13)] Query encoded as {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746215| [Query]: {Query#4} Compiling JSON query: {"WHAT":[["EUCLIDEAN_DISTANCE()",[".abc"],[".def"],2]]}
          20:06:00.746336| [Query]: {Query#4} Compiled as SELECT fl_result(euclidean_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'), 2)) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          20:06:00.746532| [Query]: {QueryEnum#5} Created on {Query#4} with 1 rows (18 bytes) in 0.030ms
          20:06:00.746660| [Query]: (QueryResultSet) [Thread Pool Worker (13)] Beginning query enumeration (6000024e43d0)
          20:06:00.747111| [Query]: (QueryResultSet) [Thread Pool Worker (13)] End of query enumeration (6000024e43d0)
          20:06:00.747196| [Query]: {QueryEnum#5} Deleted
          20:06:00.750771| [Query]: (XQuery) [Thread Pool Worker (14)] Query encoded as {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750894| [Query]: {Query#6} Compiling JSON query: {"WHAT":[["COSINE_DISTANCE()",[".abc"],[".def"]]]}
          20:06:00.750993| [Query]: {Query#6} Compiled as SELECT fl_result(cosine_distance(fl_value(_doc.body, 'abc'), fl_value(_doc.body, 'def'))) FROM kv_default AS _doc WHERE (_doc.flags & 1 = 0)
          {code}
          jimb Jim Borden made changes -
          Assignee Jim Borden [ jimb ] The Lite [ cbgto ]
          jimb Jim Borden made changes -
          Story Points 1
          daniel.petersen Daniel Petersen made changes -
          Fix Version/s Lithium [ 16190 ]
          daniel.petersen Daniel Petersen made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          daniel.petersen Daniel Petersen made changes -
          Fix Version/s Helium [ 17136 ]
          Fix Version/s Lithium [ 16190 ]
          Priority Minor [ 4 ] Major [ 3 ]
          daniel.petersen Daniel Petersen made changes -
          Fix Version/s Lithium [ 16190 ]
          Fix Version/s Helium [ 17136 ]
          sandy.chuang Sandy Chuang made changes -
          Rank Ranked higher
          sandy.chuang Sandy Chuang made changes -
          Rank Ranked higher
          sandy.chuang Sandy Chuang made changes -
          Rank Ranked higher
          sandy.chuang Sandy Chuang made changes -
          Story Points 5
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          manasa.ghanta Manasa Ghanta (Inactive) made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            The Lite The Lite
            manasa.ghanta Manasa Ghanta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty