This project is mirrored from https://github.com/cockroachdb/cockroach. Pull mirroring updated .
  1. 04 Jun, 2020 20 commits
    • craig[bot]'s avatar
      Merge #49818 · f98432f9
      craig[bot] authored
      49818: colexec: add JSONFetchVal operator for vectorized engine r=yuzefovich a=yongyanglai
      
      Previvously, the vectorized engine had no support for JSONFetchVal
      operator. This commit added JSONFetchVal operator.
      In this commit, I added BytesFamily into compatible canonical type
      family group of DatumVecCanonicalTypeFamily. Then I declared
      JSONFetchVal as supported binary operator and registered output
      type of JSONFetchVal to generate operators.
      
      Fixes #49469
      
      Release note (sql change): Vectorized engine now support JSONFetchVal(->) operator.
      Co-authored-by: default avatarYongyang Lai <[email protected]>
      f98432f9
    • craig[bot]'s avatar
      Merge #49836 · 588c0a3f
      craig[bot] authored
      49836: errorutil/unimplemented: use redirect server for Github links r=knz a=rafiss
      
      closes #45504
      
      This will allow us to capture telemetry such as click counts for each
      unimplemented error that is returned.
      
      Release note (general change): Links that are returned in error messages
      to point to unimplemented issues now use the CockroachLabs
      redirect/short-link server.
      Co-authored-by: default avatarRafi Shamim <[email protected]>
      588c0a3f
    • craig[bot]'s avatar
      Merge #49827 #49833 #49869 #49870 #49871 · 67252bc4
      craig[bot] authored
      49827: geo/geomfn: Implements ST_Segmentize for geometry r=otan a=abhishek20123g
      
      Fixes https://github.com/cockroachdb/cockroach/issues/49029
      
      This PR implements ST_Segmentize({geometry, float8}) builtin
      function, which allows modify given geometry such that no
      segment longer than the given max_segment_length.
      
      Also this PR refactors and add extra test cases for
      ST_Segmentize for geography.
      
      Release note (sql change): This PR implements ST_Segmentize({geometry,
      float8}) builtin function.
      
      49833: geo/geomfn: implement Intersection, PointOnSurface, Union r=sumeerbhola a=otan
      
      The last of the topology operators up to Chapter 20.
      
      Resolves #48951
      Resolves #49832 
      Resolves #49064
      
      Release note (sql change): Implements the ST_Intersection,
      ST_PointOnSurface and ST_Union builtin functions.
      
      49869: vendor: bump golang/protobuf to 1.4.2 r=knz a=tbg
      
      v1.4.1 aggressively deprecated something (by inserting panics) that was
      reachable via gogoproto's marshaler. Luckily, v1.4.2 has this "fixed";
      it caused enough trouble for others as well.
      
      Closes #49842.
      
      Release note: None
      
      49870: schemachange: unskip TestDropWhileBackfill r=spaskob a=spaskob
      
      Disabling the GC job was preventing this test from completing.
      Tested with `test stress`: 1000 successful runs.
      
      Fixes #44944.
      
      Release note: none.
      
      49871: kvserver: fixup test failure message r=andreimatei a=andreimatei
      
      Expected and real err were reversed.
      
      Release note: None
      Co-authored-by: default avatarabhishek20123g <[email protected]>
      Co-authored-by: default avatarOliver Tan <[email protected]>
      Co-authored-by: default avatarTobias Schottdorf <[email protected]>
      Co-authored-by: default avatarSpas Bojanov <[email protected]>
      Co-authored-by: default avatarAndrei Matei <[email protected]>
      67252bc4
    • Oliver Tan's avatar
      geo/geomfn: implement Intersection, PointOnSurface, Union · 64964031
      Oliver Tan authored
      The last of the topology operators up to Chapter 20.
      
      Release note (sql change): Implements the ST_Intersection,
      ST_PointOnSurface and ST_Union builtin functions.
      64964031
    • craig[bot]'s avatar
      Merge #47606 #49770 #49819 · 994d3064
      craig[bot] authored
      47606: ui: CSS modules for Table components r=koorosh a=koorosh
      
      Depends on #47513
      Related to #47527
      
      This change refactors components to use CSS modules and
      incorporate all required styles without any external
      dependencies and prevent styles altering from outside.
      It affects several components which tightly
      coupled with StatementsTable and couldn't be changed
      separately.
      
      Following component are changed:
      - HighlightedText
      - Drawer
      - StatementsTable
      - SortableTable
      
      Note, that `StatementsTable#makeCommonColumns` function
      is refactored to provide custom styles from parent to
      child components via props instead of overriding styles.
      
      Storybook is extended to show some components as independent
      units or in context of `StatementTable` component (if it is
      only the way components work).
      
      Release note: None
      
      49770: changefeedccl: change default flush interval to 5s r=dt a=dt
      
      We observed a customer cluster's changefeeds to cloud storage 'getting stuck'
      which on further investigation was determined to be happening because they
      were spending too much time in flushing. This was because they were writing to
      a cloud sink and the default flush interval of 200ms (poller interval of 1s / 5)
      meant it spent all of its time flushing. This default was picked testing with
      lower-latency sinks and was noted in a comment as somewhat arbitrary.
      
      This change does two things: it increases the default to the poller interval
      if unspecified, instead of poller interval / 5, meaning 1s instead of 200ms
      at the default setting, and if the sink being used is cloud storage, it
      changes it to the greater of that or 5s. Users who truely desire lower latency
      can of course specify their own 'resolved' interval, so this change in the
      default is for those that are indifferent, and increasing the latency to 1s or 5s
      reduces the chance of hiitting this unfortunate edge case when the sink is too slow.
      
      Release note (enterprise change): The default flush interval for changefeeds that do not specify a 'resolved' option is now 1s instead of 200ms, or 5s if the changefeed sink is cloud-storage.
      
      49819: Use faster set for column IDs in schemaexpr r=mgartner a=mgartner
      
      #### sqlbase: add ColSet wrapper for util.FastIntSet of ColumnID
      
      There are numerous places where a `map[sqlbase.ColumnID]struct{}` or a
      `util.FastIntSet` is used to represent a set of `sqlbase.ColumnID`. This
      commit adds a typed wrapper around `util.FastIntSet` which is an
      efficient and ergonimic replacement for maps and `util.FastIntSet`.
      
      Release note: None
      
      #### schemaexpr: use sqlbase.ColSet instead of maps
      
      This commit replaces maps used as sets of integers with sqlbase.ColSet
      because it is a more efficient set implementation.
      
      Release note: None
      Co-authored-by: default avatarAndrii Vorobiov <[email protected]>
      Co-authored-by: default avatarDavid Taylor <[email protected]>
      Co-authored-by: default avatarMarcus Gartner <[email protected]>
      994d3064
    • craig[bot]'s avatar
      Merge #47513 #49779 #49783 #49804 · 82f172ab
      craig[bot] authored
      47513: ui: CSS modules for PlanView component r=koorosh a=koorosh
      
      Depends on: #47484
      Related to: #47527
      
      - Refactored font imports to correctly resolve paths when module is required from different locations;
      Fonts are imported directly from `app.styl` file which allows import `typography.styl` without dependencies. This change was required because importing `typography.styl` file from CSS modules
      failed with unresolved paths inside of `fonts.styl` file (which was required in `typography.styl` file).
      Before,
      ```
      app.styl
      |-- typography.styl
           |-- fonts.styl
      ```
      Now:
      ```
      app.styl
      |-- typography.styl
      |-- fonts.styl
      ```
      - Move all files related to PlanView component under `planView` directory
      - Added storybook for `PlanView` component
      - `planView.module.styl` file contains copy of styles (from `statements.styl`) which is used by component only.
      
      Release note: None
      
      49779: opt: incorporate cast volatility r=RaduBerinde a=RaduBerinde
      
      This change incorporates the new cast volatility information into the
      VolatilitySet property.
      
      Release note: None
      
      49783: geo/geotransform: implement ST_Transform r=sumeerbhola a=otan
      
      This PR implements ST_Transform, allowing the transformation from one
      SRID to another.
      
      The `geoprojbase` package defines a barebones set of types as well as a
      hardcoded list of SRIDs to keep in memory. I've only filled in a few for
      now, and will save updating this for a later PR.
      
      `geoproj` is strictly a C library interface library which performs the
      necessary transformations.
      
      `geotransform` is where the function is actually handled and to be used
      by `geo_builtins.go`.
      
      Resolves #49055
      Resolves #49056
      Resolves #49057
      Resolves #49058
      
      Release note (sql change): Implemented the ST_Transform function for
      geometries.
      
      49804: opt: ON UPDATE cascades for Upsert r=RaduBerinde a=RaduBerinde
      
      This change implements ON UPDATE actions for Upsert operations. The existing
      machinery for Update can be used without modification.
      
      Release note: None
      Co-authored-by: default avatarAndrii Vorobiov <[email protected]>
      Co-authored-by: default avatarRadu Berinde <[email protected]>
      Co-authored-by: default avatarOliver Tan <[email protected]>
      82f172ab
    • Spas Bojanov's avatar
      schemachange: unskip TestDropWhileBackfill · 610f23f3
      Spas Bojanov authored
      Disabling the GC job was preventing this test from completing.
      Tested with `test stress`: 1000 successful runs.
      
      Fixes #44944.
      
      Release note: none.
      610f23f3
    • Andrei Matei's avatar
      kvserver: fixup test failure message · c31c4c49
      Andrei Matei authored
      Expected and real err were reversed.
      
      Release note: None
      c31c4c49
    • Oliver Tan's avatar
      geo/geotransform: implement ST_Transform · 8b396c85
      Oliver Tan authored
      This PR implements ST_Transform, allowing the transformation from one
      SRID to another.
      
      The `geoprojbase` package defines a barebones set of types as well as a
      hardcoded list of SRIDs to keep in memory. I've only filled in a few for
      now, and will save updating this for a later PR.
      
      `geoproj` is strictly a C library interface library which performs the
      necessary transformations.
      
      `geotransform` is where the function is actually handled and to be used
      by `geo_builtins.go`.
      
      Release note (sql change): Implemented the ST_Transform function for
      geometries.
      8b396c85
    • craig[bot]'s avatar
      Merge #49748 #49765 · 55c8934d
      craig[bot] authored
      49748: ui: Cypress regression visual testing r=koorosh a=koorosh
      
      Resolves #49589
      
      Visual regression testing is accomplished by `cypress-image-snapshot`
      plugin.
      The main issue solved with this change is how modules are loaded
      from custom `node_modules` location (./opt/node_modules).
      - for .ts files `baseUrl` and `typeRoots` are pointing to
      `./opt/node_modules` to resolve packages and typings.
      - Webpack configuration is extended with additional module
      resolver.
      - Plugin modules (which aren't processed by Webpack) use
      helper function which appends path to `opt/node_modules` to
      required module name.
      
      Add screenshot testing for main pages in Admin UI.
      These tests are quite flaky and might fail because
      nondeterministic state of the server during tests run.
      
      
      Release note: None
      
      49765: sqlbase: Add system.scheduled_jobs table r=miretskiy a=miretskiy
      
      Informs #49346
      
      Add system.scheduled_job table to system catalog.
      Add sql migration code to create table when upgrading.
      
      See https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20200414_scheduled_jobs.md
      
      Release Notes: None
      Co-authored-by: default avatarAndrii Vorobiov <[email protected]>
      Co-authored-by: default avatarYevgeniy Miretskiy <[email protected]>
      55c8934d
    • Tobias Schottdorf's avatar
      vendor: bump golang/protobuf to 1.4.2 · 415d614f
      Tobias Schottdorf authored
      v1.4.1 aggressively deprecated something (by inserting panics) that was
      reachable via gogoproto's marshaler. Luckily, v1.4.2 has this "fixed";
      it caused enough trouble for others as well.
      
      Closes #49842.
      
      Release note: None
      415d614f
    • Andrii Vorobiov's avatar
      ui: CSS modules for SortableTable and StatementsTable · af044f0f
      Andrii Vorobiov authored
      This change refactors components to use CSS modules and
      incorporate all required styles without any external
      dependencies and prevent styles altering from outside.
      It affects several components which tightly
      coupled with StatementsTable and couldn't be changed
      separately.
      
      Following component are changed:
      - HighlightedText
      - Drawer
      - StatementsTable
      - SortableTable
      
      Note, that `StatementsTable#makeCommonColumns` function
      is refactored to provide custom styles from parent to
      child components via props instead of overriding styles.
      
      Storybook is extended to show some components as independent
      units or in context of `StatementTable` component (if it is
      only the way components work).
      
      Release note: None
      af044f0f
    • Andrii Vorobiov's avatar
      ui: Refactor classNames usage with bind for PlanView component · 5fff70be
      Andrii Vorobiov authored
      Previously, class names were constructed by simply accessing
      style modules class names and assigning it to classes. It was
      cumbersome and not readable at all.
      
      To enhance this, `classnames/bind` alternate is used, which
      allows simply put class names.
      
      Release note: None
      5fff70be
    • Andrii Vorobiov's avatar
      ui: CSS modules for PlanView component · 83de8d32
      Andrii Vorobiov authored
      - refactor fonts imports to correctly resolve paths
      when module is required from different locations;
      - move all files related to PlanView component under
      `planView` directory
      - Added story for PlanView component
      
      Release note: None
      83de8d32
    • Andrii Vorobiov's avatar
      ui: Add Statements page storybook · cf566561
      Andrii Vorobiov authored
      To test styles isolation for statements page
      we need storybook which displays entire
      Statements screen only.
      
      To make it work, RouterProvider decorator
      is added which connects router to dummy (empty)
      store.
      
      `statementsPage.fixture.ts` file contains snapshot
      of required props for StatementsPage component
      
      Release note: None
      cf566561
    • abhishek20123g's avatar
      geo/geomfn: Implements ST_Segmentize for geometry · 325b6154
      abhishek20123g authored
      Fixes https://github.com/cockroachdb/cockroach/issues/49029
      
      This PR implements ST_Segmentize({geometry, float8}) builtin
      function, which allows modify given geometry such that no
      segment longer than the given max_segment_length.
      
      Also this PR refactors and add some extra test cases for
      ST_Segmentize for geography.
      
      Release note (sql change): This PR implements ST_Segmentize({geometry,
      float8}) builtin function.
      325b6154
    • Marcus Gartner's avatar
      schemaexpr: use sqlbase.TableColSet instead of maps · f61f13e1
      Marcus Gartner authored
      This commit replaces maps used as sets of integers with
      sqlbase.TableColSet because it is a more efficient set implementation.
      
      Release note: None
      f61f13e1
    • Yongyang Lai's avatar
      colexec: add JSONFetchVal operator for vectorized engine · 67d55a09
      Yongyang Lai authored
      Previously, the vectorized engine had no support for JSONFetchVal
      operator. This commit added JSONFetchVal operator.
      In this commit, I added BytesFamily into compatible canonical type
      family group of DatumVecCanonicalTypeFamily. Then I declared
      JSONFetchVal as supported binary operator and registered output
      type of JSONFetchVal to generate operators.
      
      Release note (sql change): Vectorized engine now support JSONFetchVal(->) operator.
      67d55a09
    • Radu Berinde's avatar
      opt: ON UPDATE cascades for Upsert · 185c0ab2
      Radu Berinde authored
      This change implements ON UPDATE actions for Upsert operations. The existing
      machinery for Update can be used without modification.
      
      Release note: None
      185c0ab2
    • Radu Berinde's avatar
      sql: update cascade_opt logictest · cca10937
      Radu Berinde authored
      Making some updates that were made only to the `cascade` version.
      
      Release note: None
      cca10937
  2. 03 Jun, 2020 20 commits
    • Rafi Shamim's avatar
      errorutil/unimplemented: use redirect server for Github links · e9937573
      Rafi Shamim authored
      This will allow us to capture telemetry such as click counts for each
      unimplemented error that is returned.
      
      Release note (general change): Links that are returned in error messages
      to point to unimplemented issues now use the CockroachLabs
      redirect/short-link server.
      e9937573
    • craig[bot]'s avatar
      Merge #49763 #49834 · fd1bccfd
      craig[bot] authored
      49763: kv: introduce a rate limiter for the range consistency checker r=lunevalex a=lunevalex
      
      Closes #47290
      
      This commit introduces a new flag server.consistency_check.max_rate to control the rate at which the consistency checker may scan through the range to compute it's checksum. Without a rate limit in place the checker cmay overwhelm the cluster with sufficiently large nodes. For example on a 10B node the checker is expected to produce 120MB/second of disk reads. The flag is defined as bytes/second and set to 8MB/s by default. We expect the customers to continue to use it in conjunction with server.consistency_check.interval, which will givem the ability to control both the frequency and speed of checks.
      
      Release note (performance improvement): Introduce a new flag server.consistency_check.max_rate expressed in bytes/second to throttle the rate at which cockroach scans through the disk to perform a consistency check. This control is necessary to ensure smooth performance on a cluster with large node sizes (i.e. in the 10TB+ range)
      
      49834: .github: add geospatial code owners r=rytaft a=otan
      
      Release note: None
      Co-authored-by: default avatarAlex Lunev <[email protected]>
      Co-authored-by: default avatarOliver Tan <[email protected]>
      fd1bccfd
    • craig[bot]'s avatar
      Merge #49690 · 505cfdb5
      craig[bot] authored
      49690: lease: un-track deprecated use of Gossip r=nvanbenschoten a=tbg
      
      The work to remove the dependency has been done, so we're just waiting
      until we can remove the code. Until then, make sure this use of Gossip
      does not show up as a prominent caller to DeprecatedGossip any more,
      for easier bookkeeping.
      
      Release note: None
      Co-authored-by: default avatarTobias Schottdorf <[email protected]>
      505cfdb5
    • Yevgeniy Miretskiy's avatar
      sqlbase: Add system.scheduled_jobs table · 2ae39b6f
      Yevgeniy Miretskiy authored
      Add system.scheduled_job table to system catalog.
      Add sql migration code to create table when upgrading.
      
      See https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20200414_scheduled_jobs.md
      
      Release Notes: None
      2ae39b6f
    • craig[bot]'s avatar
      Merge #49816 #49837 · d8d001b2
      craig[bot] authored
      49816: sql: add support for ANALYZE <tablename> r=rytaft a=rytaft
      
      This commit adds support for `ANALYZE <tablename>` by adding the
      statement as syntactic sugar for the equivalent command
      `CREATE STATISTICS "" FROM <tablename>`. This improves compatibility
      with Postgres, and is needed to run the PostGIS tutorial as written.
      
      Note that this commit does not add support for `ANALYZE` without a
      table name. We can add support for that and other variants later if
      needed, but it is not necessary for the PostGIS tutorial.
      
      Fixes #49214
      
      Release note (sql change): Added support for `ANALYZE <tablename>`,
      which causes the database to collect statistics on the given table for
      use by the optimizer. The functionality of this command is equivalent
      to the existing command `CREATE STATISTICS "" FROM <tablename>`, but
      it increases compatibility with Postgres by using the same syntax that
      Postgres uses.
      
      49837: docs: enhance the contributor guide r=otan a=knz
      
      The contributor guide only contained a URL to the wiki, and was
      missing searchable keywords.
      
      This patch adds that, as well as a link to the community slack.
      
      Release note: None
      Co-authored-by: default avatarRebecca Taft <[email protected]>
      Co-authored-by: default avatarRaphael 'kena' Poss <[email protected]>
      d8d001b2
    • Raphael 'kena' Poss's avatar
      docs: enhance the contributor guide · 64f02afb
      Raphael 'kena' Poss authored
      The contributor guide only contained a URL to the wiki, but was
      missing searchable keywords.
      
      This patch adds that, as well as a link to the community slack.
      
      Release note: None
      64f02afb
    • Alex Lunev's avatar
      kv: introduce a rate limiter for the range consistency checker · 76c63ded
      Alex Lunev authored
      Closes #47290
      
      This commit introduces a new flag server.consistency_check.max_rate to control the rate at which the consistency checker may scan through the range to compute it's checksum. Without a rate limit in place the checker cmay overwhelm the cluster with sufficiently large nodes. For example on a 10B node the checker is expected to produce 120MB/second of disk reads. The flag is defined as bytes/second and set to 8MB/s by default. We expect the customers to continue to use it in conjunction with server.consistency_check.interval, which will givem the ability to control both the frequency and speed of checks.
      
      Release note (performance improvement): Introduce a new flag server.consistency_check.max_rate expressed in bytes/second to throttle the rate at which cockroach scans through the disk to perform a consistency check. This control is necessary to ensure smooth performance on a cluster with large node sizes (i.e. in the 10TB+ range)
      76c63ded
    • Marcus Gartner's avatar
      sqlbase: add TableColSet wrapper for util.FastIntSet of ColumnID · be12f0e8
      Marcus Gartner authored
      There are numerous places where a `map[sqlbase.ColumnID]struct{}` or a
      `util.FastIntSet` is used to represent a set of `sqlbase.ColumnID`. This
      commit adds a typed wrapper around `util.FastIntSet` which is an
      efficient and ergonomic replacement for maps and `util.FastIntSet`.
      
      Release note: None
      be12f0e8
    • craig[bot]'s avatar
      Merge #49671 · 59b79642
      craig[bot] authored
      49671: sql: handle inserts for partial indexes r=mgartner a=mgartner
      
      This commit makes INSERTs only write new entries to partial indexes when
      the new row satisfies the predicate expression of the partial index.
      
      In order to do this, the optimizer synthesizes a column for each partial
      index defined on the table that evaluates to true if the respective
      partial index should be written to. These columns are interpretted by the
      execution engine into a set of IndexIDs to not write to.
      
      Release note: None
      Co-authored-by: default avatarMarcus Gartner <[email protected]>
      59b79642
    • craig[bot]'s avatar
      Merge #49812 · c87535a0
      craig[bot] authored
      49812: kvserver: TestReplicateQueueDownReplicate r=andreimatei a=andreimatei
      
      This test was trying to upreplicate a range and then wait for the
      replication queue to downreplicate it. The test had rotted back when we
      switched the replication factor of system ranges from 3x to 5x; with
      5x replication, the range started off as having 5 replicas so the
      upreplication step was unnecessary. Worse, the upreplication part was
      flaky, presumably because it was constantly racing with the replication
      queue trying to downreplicate the range (although I couldn't repro
      despite a lot of stress).
      
      Fixes #48284
      
      Release note: None
      Co-authored-by: default avatarAndrei Matei <[email protected]>
      c87535a0
    • Andrei Matei's avatar
      kvserver: TestReplicateQueueDownReplicate · 82219501
      Andrei Matei authored
      This test was trying to upreplicate a range and then wait for the
      replication queue to downreplicate it. The test had rotted back when we
      switched the replication factor of system ranges from 3x to 5x; with
      5x replication, the range started off as having 5 replicas so the
      upreplication step was unnecessary. Worse, the upreplication part was
      flaky, presumably because it was constantly racing with the replication
      queue trying to downreplicate the range (although I couldn't repro
      despite a lot of stress).
      
      Fixes #48284
      
      Release note: None
      82219501
    • Oliver Tan's avatar
      .github: add geospatial code owners · fa3286b3
      Oliver Tan authored
      Release note: None
      fa3286b3
    • craig[bot]'s avatar
      Merge #49565 #49721 #49815 · c8808ad5
      craig[bot] authored
      49565: sql: serialize UDTs in expressions in a stable way r=otan,jordanlewis a=rohany
      
      Fixes #49379.
      
      This PR ensures that serialized expressions stored durably in table
      descriptors are serialized in a format that is stable across changes to
      user defined types present in those expressions. An effect of this
      change is that these expressions must be reparsed and formatted in a
      human readable way before display in statements like `SHOW CREATE
      TABLE`. 
      
      Release note: None
      
      49721: storage: Add rocksdb-vs-pebble benchmark for ExportToSst r=itsbilal a=itsbilal
      
      As part of the investigation into #49710, this change adds a
      benchmark for ExportToSst that tests both RocksDB and Pebble.
      
      Here are some example runs without contention (old = rocksdb,
      new = pebble):
      
      	name                                                   old time/op  new time/op  delta
      	ExportToSst/rocksdb/numKeys=64/numRevisions=1-12       43.9µs ± 3%  34.5µs ± 4%  -21.33%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=64/numRevisions=10-12       281µs ± 3%   169µs ± 6%  -39.89%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=64/numRevisions=100-12     1.82ms ±22%  1.17ms ± 1%  -35.73%  (p=0.000 n=10+9)
      	ExportToSst/rocksdb/numKeys=512/numRevisions=1-12       212µs ± 6%   111µs ± 3%  -47.77%  (p=0.000 n=10+9)
      	ExportToSst/rocksdb/numKeys=512/numRevisions=10-12     1.91ms ± 1%  1.19ms ± 8%  -37.65%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=512/numRevisions=100-12    13.7ms ± 3%  10.1ms ±12%  -26.21%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=1024/numRevisions=1-12      390µs ± 1%   215µs ±12%  -44.94%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=1024/numRevisions=10-12    4.01ms ± 6%  2.40ms ±16%  -40.13%  (p=0.000 n=10+9)
      	ExportToSst/rocksdb/numKeys=1024/numRevisions=100-12   27.9ms ± 2%  20.8ms ± 2%  -25.48%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=8192/numRevisions=1-12     2.97ms ± 2%  1.42ms ± 5%  -52.24%  (p=0.000 n=9+10)
      	ExportToSst/rocksdb/numKeys=8192/numRevisions=10-12    32.8ms ± 7%  19.1ms ± 3%  -41.59%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=8192/numRevisions=100-12    224ms ± 3%   169ms ±25%  -24.64%  (p=0.000 n=9+10)
      	ExportToSst/rocksdb/numKeys=65536/numRevisions=1-12    23.7ms ± 4%  13.4ms ±20%  -43.65%  (p=0.000 n=9+10)
      	ExportToSst/rocksdb/numKeys=65536/numRevisions=10-12    264ms ± 4%   201ms ±24%  -23.92%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=65536/numRevisions=100-12   1.88s ± 6%   1.23s ± 8%  -34.70%  (p=0.000 n=10+8)
      
      And some with contention=true:
      
      	name                                                                   old time/op  new time/op  delta
      	ExportToSst/rocksdb/numKeys=65536/numRevisions=10/contention=true-12    362ms ± 7%   168ms ± 3%  -53.60%  (p=0.000 n=10+10)
      	ExportToSst/rocksdb/numKeys=65536/numRevisions=100/contention=true-12   2.24s ± 6%   1.24s ±10%  -44.50%  (p=0.000 n=10+10)
      
      Release note: None.
      
      49815: roachpb: refuse nil desc in NewRangeKeyMismatchError r=andreimatei a=andreimatei
      
      Since recently RangeKeyMismatchError does not support nil descriptors,
      but it still had code that pretended to deal with nils (even though a
      nil would have exploded a bit later). Only one test caller was passing a
      nil, and it turns out that was dead code.
      
      Release note: None
      Co-authored-by: default avatarRohan Yadav <[email protected]>
      Co-authored-by: default avatarBilal Akhtar <[email protected]>
      Co-authored-by: default avatarAndrei Matei <[email protected]>
      c8808ad5
    • Rebecca Taft's avatar
      sql: add support for ANALYZE <tablename> · 3105d70e
      Rebecca Taft authored
      This commit adds support for `ANALYZE <tablename>` by adding the
      statement as syntactic sugar for the equivalent command
      `CREATE STATISTICS "" FROM <tablename>`. This improves compatibility
      with Postgres, and is needed to run the PostGIS tutorial as written.
      
      Note that this commit does not add support for `ANALYZE` without a
      table name. We can add support for that and other variants later if
      needed, but it is not necessary for the PostGIS tutorial.
      
      Fixes #49214
      
      Release note (sql change): Added support for `ANALYZE <tablename>`,
      which causes the database to collect statistics on the given table for
      use by the optimizer. The functionality of this command is equivalent
      to the existing command `CREATE STATISTICS "" FROM <tablename>`, but
      it increases compatibility with Postgres by using the same syntax that
      Postgres uses.
      3105d70e
    • Radu Berinde's avatar
      opt: incorporate casts volatility · 65173193
      Radu Berinde authored
      This change incorporates the new cast volatility information into the
      VolatilitySet property.
      
      Release note: None
      65173193
    • craig[bot]'s avatar
      Merge #49800 · 69bc0192
      craig[bot] authored
      49800: roachtest: log on error in isAlive r=nvanbenschoten a=nvanbenschoten
      
      Closes #49358.
      Co-authored-by: default avatarNathan VanBenschoten <[email protected]>
      69bc0192
    • Rohan Yadav's avatar
      sql: serialize UDTs in expressions in a stable way · b527d66c
      Rohan Yadav authored
      Fixes #49379.
      
      This PR ensures that serialized expressions stored durably in table
      descriptors are serialized in a format that is stable across changes to
      user defined types present in those expressions. An effect of this
      change is that these expressions must be reparsed and formatted in a
      human readable way before display in statements like `SHOW CREATE
      TABLE`. That work will be done in a follow up PR.
      
      Release note: None
      b527d66c
    • Marcus Gartner's avatar
      sql: handle inserts for partial indexes · 1c3404a6
      Marcus Gartner authored
      This commit makes INSERTs only write new entries to partial indexes when
      the new row satisfies the predicate expression of the partial index.
      
      In order to do this, the optimizer synthesizes a column for each partial
      index defined on the table that evaluates to true if the respective
      partial index should be written to. These columns are interpretted by the
      execution engine into a set of IndexIDs to not write to.
      
      Release note: None
      1c3404a6
    • craig[bot]'s avatar
      Merge #49799 · a51c5e3d
      craig[bot] authored
      49799: geo/geodist: speed up dwithin/distance operations with bbox r=sumeerbhola a=otan
      
      We can optimize distance checks by saying if their bounding boxes do not
      intersect then we only need to check the exteriors. This shaved 2-3s off
      a 7s query available in the PostGIS tutorial.
      
      Existing test cases exercise this functionality well.
      
      Release note: None
      Co-authored-by: default avatarOliver Tan <[email protected]>
      a51c5e3d
    • Oliver Tan's avatar
      geo/geodist: speed up dwithin/distance operations with bbox · 3d85fedf
      Oliver Tan authored
      We can optimize distance checks by saying if their bounding boxes do not
      intersect then we only need to check the exteriors. This shaved 2-3s off
      a 7s query available in the PostGIS tutorial.
      
      Existing test cases exercise this functionality well.
      
      Release note: None
      3d85fedf