1. 17 Sep, 2019 22 commits
    • craig[bot]'s avatar
      Merge #40824 · 09acaf49
      craig[bot] authored
      40824: cli: make COCKROACH_URL work as intended r=bdarnell a=knz
      
      Fixes #40747.
      
      Release justification: see individual commits
      Co-authored-by: 's avatarRaphael 'kena' Poss <[email protected]>
      09acaf49
    • craig[bot]'s avatar
      Merge #40793 · 0c6fcf00
      craig[bot] authored
      40793: sql,sqlbase,client: bootstrap TableDescriptor timestamps from MVCC r=ajwerner a=ajwerner
      
      This PR adds back the changes in #40581 and deals with the fallout that led to #40781 in the 3rd commit.
      
      Release Justification: Fixes a bug formerly considered to be a release blocker. 
      Co-authored-by: 's avatarAndrew Werner <[email protected]>
      0c6fcf00
    • Andrew Werner's avatar
      sqlbase,backupccl: properly handle TableDescriptor timestamps for old versions · 05a000a4
      Andrew Werner authored
      This PR ensures that the now logic to set the TableDescriptor timestamps
      from MVCC timestamps works in the face of table descriptors created in previous
      versions. There are two main hazards which this commit addresses:
      
      1) Tables created before 19.1 will not carry a CreateAsOfTimestamp.
         This field is not important to set on these tables as they certainly
         were not relying on this value for a CTAS.
      
      2) Ensure that TableDescriptors from a backup contain a non-zero
         ModificationTime. Before 19.1 we created Version 1 of tables with
         a zero ModificationTime. When restoring such a table we set its
         ModificationTime to hlc.Timestamp{WallTime: 1}. This prevents any
         invariants from being violated.
      
      This commit also adds a test to backupccl which restores a database
      from all previous major versions to ensure that the restore works
      properly.
      
      Release Justification: Fixes a bug in a PR which was approved for release
      and adds testing.
      
      Release note: None
      05a000a4
    • Andrew Werner's avatar
      roachlint: add linter to prevent calls to sqlbase.Descriptor.GetTable() · 28aabd62
      Andrew Werner authored
      Callers should use sqlbase.Descriptor.Table() instead.
      
      Release justification: This is a linter for the first commit which is an
      approved change.
      
      Release note: None
      28aabd62
    • Andrew Werner's avatar
      sql,sqlbase,client: bootstrap TableDescriptor timestamps from MVCC · ea432032
      Andrew Werner authored
      Using the MVCC timestamp of the value for table descriptors has long been
      theorized as the right mechanism to eliminate the need for transactions
      which update a table descriptor version to observe their commit timestamp
      (see https://github.com/cockroachdb/cockroach/issues/17698#issuecomment-452035873).
      
      The challenge was presumed to be the need to expose MVCC timestamps in our
      client library. It turns out we seem to do that already (how did nobody know
      that?!).
      
      This commit avoids using the CommitTimestamp by using the MVCC timestamp on
      the read path. In order to make this setting of the timestamp less of a footgun
      we add a `(*Descriptor).Table(hlc.Timestamp)` method which forces anybody who
      extracts a `TableDescriptor` from a `Descriptor` to pass in a timestamp which
      may be used to set `ModificationTime` and `CreateAsOfTime`. A linter in the
      following commit enforces this proper usage.
      
      The below SQL would always fail before this change and now passes:
      
      ```
      CREATE TABLE foo ( k INT PRIMARY KEY );
      BEGIN;
      DROP TABLE foo;
      <wait a while>
      COMMIT;
      ```
      
      Similarly the TestImportData seems to pass under stressrace with a 5s
      `kv.closed_timestamp.target_duration`.
      
      Release justification: fixes a release blocker and known customer issue.
      
      References #37083.
      
      Release note: None
      ea432032
    • craig[bot]'s avatar
      Merge #40676 #40838 · faaa6999
      craig[bot] authored
      40676: sql: stop presplitting spans on every import proc r=pbardea a=pbardea
      
      We are currently presplitting spans (on every table and index boundary)
      for every processor. We should only be doing this once so this PR moves
      it to the planning stage.
      
      Addresses #39072.
      
      Release note: None
      
      40838: makefile: increase test timeout r=andreimatei a=andreimatei
      
      This patch increases the test timeout for every package from 12m to 20m
      (and under stress from 25m to 30m).
      This is motivated by the sql TestLogic which has been inching towards
      the 12m recently (according to TeamCity history) and is sometimes timing
      out. Hopefully it's because we've been adding more tests...
      
      Fixes #40572
      
      Release note: None
      
      Release justification: fix timeout flakes
      Co-authored-by: 's avatarPaul Bardea <[email protected]>
      Co-authored-by: 's avatarAndrei Matei <[email protected]>
      faaa6999
    • craig[bot]'s avatar
      Merge #40808 #40823 #40833 · 19086baa
      craig[bot] authored
      40808: storage: deflake TestStoreRangeUpReplicate r=nvanbenschoten a=nvanbenschoten
      
      Fixes #40789.
      
      Wait for all Ranges to upreplicate before counting learner snapshots.
      I was seeing `r6:/Table/{SystemConfigSpan/Start-11} [(n1,s1):1, next=2, gen=0]`
      still in the process of upreplication when we were aggregating the counters.
      
      Release justification: fixes flaky test.
      
      Release note: None
      
      40823: partitionccl: deflake TestRepartitioning r=nvanbenschoten a=ajwerner
      
      Sometimes this test would fail if the underlying gosql.DB had multiple
      `Conn`s as the `Conn` used to query for the rows would not be the `Conn`
      used to read the trace. Amazingly this wasn't more flaky.
      
      Release Justification: Only touches a test.
      
      Release note: None
      
      40833: roachprod: fix `roachprod status -h` to specify cluster param r=irfansharif a=irfansharif
      
      Release justification: Category 1: Non-production code changes
      Release note: None
      Co-authored-by: 's avatarNathan VanBenschoten <[email protected]>
      Co-authored-by: 's avatarAndrew Werner <[email protected]>
      Co-authored-by: 's avatarirfan sharif <[email protected]>
      19086baa
    • Paul Bardea's avatar
      sql: stop presplitting spans on every import proc · 89f4cdfc
      Paul Bardea authored
      We are currently presplitting spans (on every table and index boundary)
      for every processor. We should only be doing this once so this PR moves
      it to the planning stage.
      
      Release justification: improves test flakes associated with too many
      AdminSplit requests.
      
      Release note: None
      89f4cdfc
    • craig[bot]'s avatar
      Merge #40828 · d490467d
      craig[bot] authored
      40828: server: hang the reporter from the server, not from the node r=andreimatei a=andreimatei
      
      Because the reporter needs many server components (indirectly, through
      the dependency on the InternalExecutor), and the Node is not always
      configured with an InternalExecutor (in particular, in tests using
      createTestNode()).
      
      Fixes #40782
      
      Release justification: fix to flaky test
      Co-authored-by: 's avatarAndrei Matei <[email protected]>
      d490467d
    • Andrei Matei's avatar
      makefile: increase test timeout · 45f5cd8f
      Andrei Matei authored
      This patch increases the test timeout for every package from 12m to 20m
      (and under stress from 25m to 30m).
      This is motivated by the sql TestLogic which has been inching towards
      the 12m recently (according to TeamCity history) and is sometimes timing
      out. Hopefully it's because we've been adding more tests...
      
      Fixes #40572
      
      Release note: None
      
      Release justification: fix timeout flakes
      45f5cd8f
    • irfan sharif's avatar
      roachprod: fix `roachprod status -h` to specify cluster param · 97a6637e
      irfan sharif authored
      Release justification: Category 1: Non-production code changes
      Release note: None
      97a6637e
    • Andrei Matei's avatar
      storage/reports: spell out the Reporter's dependencies · b2af6f39
      Andrei Matei authored
      The Reporter was taking a God StoreConfig and picking various
      dependencies from it. This patch lists the Reporter's dependencies
      explicitly. Besides explicit deps being better in priciple, configuring
      a Reporter with something that's ostensibly designed to configure a
      Store was unnatural, and became particularly unnatural when the Server
      began constructing the Reporter instead of the Node (as it used to be
      before the previous commit).
      
      Release note: None
      
      Release justification: minor update to new functionality.
      b2af6f39
    • Andrei Matei's avatar
      server: hang the reporter from the server, not from the node · 010e67f5
      Andrei Matei authored
      Because the reporter needs many server components (indirectly, through
      the dependency on the InternalExecutor), and the Node is not always
      configured with an InternalExecutor (in particular, in tests using
      createTestNode()).
      
      Fixes #40782
      
      Release justification: fix to flaky test
      
      Release note: None
      010e67f5
    • craig[bot]'s avatar
      Merge #40821 · ad4d6f59
      craig[bot] authored
      40821: cli/interactive_tests: deflake some tests r=andreimatei a=knz
      
      Release justification: see individual commits
      
      ### cli/interactive_tests: make server shutdown more resilient
      
      Fixes #40776.
      Fixes #40788.
      Fixes #40746.
      
      This patch intends to resolve test flakiness in the CLI interactive
      tests. The flakiness was observed while shutting down servers at the
      end of tests. The symptom are:
      
      - the `cockroach quit` command terminates successfully;
      - after 5 seconds, the process is still there (its PID is still present);
      - immediately when the 5-second loop stops and the script attempts
        to forcefully kill the process, the PID is not there any more;
      - the server log file indicates the server has shut down successfully.
      
      This combination of symptoms suggests that the server shutdown takes
      approximately 5 seconds. Flakiness occurs because most of the time it
      shuts down within 5 seconds, and only occasionally takes more than 5
      seconds.
      
      The patch thus bumps the delay for forceful shutdown up to 30
      seconds. Since an escape from the loop (server fails to shut down)
      incurs a failure of the test, we are expecting this to only occur
      rarely.
      
      Separately, the patch also changes the definition of the separate
      action `force_stop_server` to immediately kill the process. The 3
      callers of this action do not expect a graceful `quit` to succeed
      anyway.
      
      ### cli/interactive_tests: deflake test_log_config_msg
      
      Fixes #39720.
      
      This test checks that the cluster ID is reported at the start of the
      log file(s). Prior to this patch, it would check this by starting a
      server, then quitting it immediately, and then looking at the
      resulting log file.
      
      This logic was flawed, because it is possible for `cockroach quit` to
      instruct a server to shut down before it has completed
      its (informational) report in the log file.
      
      This patch resolves this bug by waiting for the expected log output
      *before* quitting the server instead of afterwards.
      Co-authored-by: 's avatarRaphael 'kena' Poss <[email protected]>
      ad4d6f59
    • Raphael 'kena' Poss's avatar
      cli/interactive_tests: deflake test_log_config_msg · 6c1e8f3d
      Raphael 'kena' Poss authored
      Release justification: fixes a test flake
      
      This test checks that the cluster ID is reported at the start of the
      log file(s). Prior to this patch, it would check this by starting a
      server, then quitting it immediately, and then looking at the
      resulting log file.
      
      This logic was flawed, because it is possible for `cockroach quit` to
      instruct a server to shut down before it has completed
      its (informational) report in the log file.
      
      This patch resolves this bug by waiting for the expected log output
      *before* quitting the server instead of afterwards.
      
      Release note: None
      6c1e8f3d
    • Raphael 'kena' Poss's avatar
      cli/interactive_tests: make server shutdown more resilient · d59a33a3
      Raphael 'kena' Poss authored
      Release justification: this reduces test flakiness.
      
      This patch intends to resolve test flakiness in the CLI interactive
      tests. The flakiness was observed while shutting down servers at the
      end of tests. The symptom are:
      
      - the `cockroach quit` command terminates successfully;
      - after 5 seconds, the process is still there (its PID is still present);
      - immediately when the 5-second loop stops and the script attempts
        to forcefully kill the process, the PID is not there any more;
      - the server log file indicates the server has shut down successfully.
      
      This combination of symptoms suggests that the server shutdown takes
      approximately 5 seconds. Flakiness occurs because most of the time it
      shuts down within 5 seconds, and only occasionally takes more than 5
      seconds.
      
      The patch thus bumps the delay for forceful shutdown up to 30
      seconds. Since an escape from the loop (server fails to shut down)
      incurs a failure of the test, we are expecting this to only occur
      rarely.
      
      Separately, the patch also changes the definition of the separate
      action `force_stop_server` to immediately kill the process. The 3
      callers of this action do not expect a graceful `quit` to succeed
      anyway.
      
      Release note: None
      d59a33a3
    • Andrew Werner's avatar
      partitionccl: deflake TestRepartitioning · 5c6744a5
      Andrew Werner authored
      Sometimes this test would fail if the underlying gosql.DB had multiple
      `Conn`s as the `Conn` used to query for the rows would not be the `Conn`
      used to read the trace. Amazingly this wasn't more flaky.
      
      Release Justification: Only touches a test.
      
      Release note: None
      5c6744a5
    • Raphael 'kena' Poss's avatar
      cli: process defaults from env vars at the end of flag init · 5a4380d7
      Raphael 'kena' Poss authored
      Release justification: fixes a crash-inducing defect
      
      Prior to this patch, the definition of the flag set and the processing
      of env vars to set to defaults was interleaved.
      
      This was incorrect, because some of the flag setters require other
      flags to be defined already (for example, `--url` delegates logic to `--user`
      / `--host`).
      
      This patch fixes this bug by deferring the initialization of defaults
      from env vars until the entire flag set has been constructed.
      
      Additionally, it also introduces a test that verifies that the env var
      `COCKROACH_URL` does indeed work as intended.
      
      Release note (bug fix): The `cockroach` CLI client commands are now
      able to connect to a server via the env var `COCKROACH_URL`.
      5a4380d7
    • Raphael 'kena' Poss's avatar
      cli: work around a bug in the upstream spf13/cobra · 22005e44
      Raphael 'kena' Poss authored
      The method `(*cobra.Command) Flags()` does not do what it says on the
      label: it does not reliably return the complete set of flags supported
      by the command (combined local and persistent flags). See upstream
      issue: https://github.com/spf13/cobra/issues/961
      
      This has resulted in various headscratches and outright bugs in
      CockroachDB's past.
      
      This commit introduce a workaround for the upstream issue that
      replaces uses of `cmd.Flags()` by `flagSetForCmd(cmd)`, which is
      guaranteed to succeed with the right flag set.
      
      Release note: None
      22005e44
    • craig[bot]'s avatar
      Merge #40668 · d21dad80
      craig[bot] authored
      40668: exec: reset internal unsafeBatch in orderedAggregator r=yuzefovich a=asubiotto
      
      Not doing so could lead to correctness results. This was not caught by
      tests, so runTests has been extended to check for operators that can be
      initialized with a variable output size. This increases
      verifySelAndNullResets's test coverage, since it doesn't do anything if
      only a single batch is output, which is the case for most unit tests.
      
      Release note: None
      
      Release justification: This commit fixes correctness bugs and increases
      test coverage (Category 2).
      
      Fixes #40641
      Co-authored-by: 's avatarAlfonso Subiotto Marqués <[email protected]>
      d21dad80
    • craig[bot]'s avatar
      Merge #40803 · 66d92bed
      craig[bot] authored
      40803: sql: replace an internal error in EXPLAIN (DISTSQL) and EXPLAIN (VEC) r=jordanlewis a=yuzefovich
      
      Currently, when we're explaining a query that has a subquery value
      of which is needed to construct the physical plan, we error out with
      an internal error. This commit replaces that stack trace with a more
      user-friendly message saying that explaining such a query is not
      supported.
      
      Addresses: #40677.
      
      Release justification: Category 2: Bug fixes and low-risk updates to
      new functionality.
      
      Release note: None
      Co-authored-by: 's avatarYahor Yuzefovich <[email protected]>
      66d92bed
    • craig[bot]'s avatar
      Merge #40816 · 2718d888
      craig[bot] authored
      40816: roachpb: improve comment on SubsumeResponse.LeaseAppliedIndex r=nvanbenschoten a=nvanbenschoten
      
      To avoid confusion.
      
      Release justification: comments only.
      
      Release note: None
      Co-authored-by: 's avatarNathan VanBenschoten <[email protected]>
      2718d888
  2. 16 Sep, 2019 15 commits
    • craig[bot]'s avatar
      Merge #40766 · 2d8c28ae
      craig[bot] authored
      40766: sql: move CFetcher from sql/row into sql/colexec r=jordanlewis a=yuzefovich
      
      Previously CFetcher lived in sql/row which caused several things
      that ought to live in sql/colexec to actually be in sql/colflow.
      This also forced the "planning" code for columnar operators to be
      in sql/colflow which didn't allow for reuse of that code in the
      unit tests of the operators. Now CFetcher is moved into sql/colexec
      (a few things needed to be exposed from sql/row) and several things
      are moved into sql/colexec from sql/colflow.
      
      I needed to extract things out of colexec/vecbuiltins package in
      order not to create a cycle with colexec due to the movement of the
      planning code into colexec.
      
      Release justification: Category 1: Non-production code changes.
      
      Release note: None
      Co-authored-by: 's avatarYahor Yuzefovich <[email protected]>
      2d8c28ae
    • Yahor Yuzefovich's avatar
      sql: replace an internal error in EXPLAIN (DISTSQL) and EXPLAIN (VEC) · 01a7d781
      Yahor Yuzefovich authored
      Currently, when we're explaining a query that has a subquery value
      of which is needed to construct the physical plan, we error out with
      an internal error. This commit replaces that stack trace with a more
      user-friendly message saying that explaining such a query is not
      supported.
      
      Release justification: Category 2: Bug fixes and low-risk updates to
      new functionality.
      
      Release note: None
      01a7d781
    • Nathan VanBenschoten's avatar
      roachpb: improve comment on SubsumeResponse.LeaseAppliedIndex · a9a9d1e6
      Nathan VanBenschoten authored
      To avoid confusion.
      
      Release justification: comments only.
      
      Release note: None
      a9a9d1e6
    • craig[bot]'s avatar
      Merge #40798 · 21090390
      craig[bot] authored
      40798: jobs: remove stale comment r=nvanbenschoten a=nvanbenschoten
      
      This has been stale since ce2511f7.
      
      Release justification: comment only.
      
      Release note: None
      Co-authored-by: 's avatarNathan VanBenschoten <[email protected]>
      21090390
    • craig[bot]'s avatar
      Merge #40800 · eb41c517
      craig[bot] authored
      40800: sql: improve error message for constraint parsing r=solongordon a=solongordon
      
      We used to throw a cryptic yaml error when zone config constraints could
      not be parsed. Now we return a friendlier error message which specifies
      what format was expected.
      
      Release justification: Low-risk error messaging improvement
      
      Release note: None
      Co-authored-by: 's avatarSolon Gordon <[email protected]>
      eb41c517
    • craig[bot]'s avatar
      Merge #40334 · 8af7fdef
      craig[bot] authored
      40334: exec: add streamID to the Inbox r=asubiotto a=Gurio
      
      Resolves #39399
      This commit adds SreamID to the Inbox.
      To distinguish between StreamID of the inbox's creator
      and the StreamID of the inbox's methods caller.
      This commit also add tests, that verify following:
      1. `Outbox.sendBatches()` doesn't propogate its ctx to `Next()`
      2. `Inbox.Next()` adds Inboxes StreamID to the incoming ctx
      3. `Inbox.DrainMeta()` adds Inboxes StreamID to the incoming ctx
      
      Release justification: low-risk patch to log tags to improve debuggability.
      Co-authored-by: 's avatarArseni Lapunov <[email protected]>
      8af7fdef
    • Nathan VanBenschoten's avatar
      storage: deflake TestStoreRangeUpReplicate · b7dcc0f3
      Nathan VanBenschoten authored
      Fixes #40789.
      
      Wait for all Ranges to upreplicate before counting learner snapshots.
      I was seeing `r6:/Table/{SystemConfigSpan/Start-11} [(n1,s1):1, next=2, gen=0]`
      still in the process of upreplication when we were aggregating the counters.
      
      Release justification: fixes flaky test.
      
      Release note: None
      b7dcc0f3
    • Arseni Lapunov's avatar
      exec: add streamID to the Inbox · e176b874
      Arseni Lapunov authored
      This commit adds SreamID to the Inbox.
      To distinguish between StreamID of the inbox's creator
      and the StreamID of the inbox's methods caller.
      This commit also add tests, that verify following:
      1. Outbox.sendBatches() doesn't propogate its ctx to Next()
      2. Inbox.Next() adds Inboxes StreamID to the incoming ctx
      3. Inbox.DrainMeta() adds Inboxes StreamID to the incoming ctx
      
      Release justification: low-risk patch to log tags to improve debuggability.
      
      Resolves #39399
      
      Release note: None
      e176b874
    • craig[bot]'s avatar
      Merge #40744 · 2d47e160
      craig[bot] authored
      40744: storage: include stats delta in replica inconsistency fatal message r=nvanbenschoten a=nvanbenschoten
      
      Release justification: trivial and helps with debugging.
      
      Release note: None
      Co-authored-by: 's avatarNathan VanBenschoten <[email protected]>
      2d47e160
    • Yahor Yuzefovich's avatar
      sql: move CFetcher from sql/row into sql/colexec · 4523361c
      Yahor Yuzefovich authored
      Previously CFetcher lived in sql/row which caused several things
      that ought to live in sql/colexec to actually be in sql/colflow.
      This also forced the "planning" code for columnar operators to be
      in sql/colflow which didn't allow for reuse of that code in the
      unit tests of the operators. Now CFetcher is moved into sql/colexec
      (a few things needed to be exposed from sql/row) and several things
      are moved into sql/colexec from sql/colflow.
      
      I needed to extract things out of colexec/vecbuiltins package in
      order not to create a cycle with colexec due to the movement of the
      planning code into colexec.
      
      Release justification: Category 1: Non-production code changes.
      
      Release note: None
      4523361c
    • Solon Gordon's avatar
      sql: improve error message for constraint parsing · b14a9909
      Solon Gordon authored
      We used to throw a cryptic yaml error when zone config constraints could
      not be parsed. Now we return a friendlier error message which specifies
      what format was expected.
      
      Fixes #39784
      
      Release justification: Low-risk error messaging improvement
      
      Release note: None
      b14a9909
    • craig[bot]'s avatar
      Merge #40781 · 5cee1942
      craig[bot] authored
      40781: sql,sqlbase,client: revert #40581 r=jordanlewis a=jordanlewis
      
      It was buggy in presence of pre 19.1 backups; reverting until @ajwerner has a chance to fix and add tests.
      
      Release justification: reverts a buggy patch
      Co-authored-by: 's avatarJordan Lewis <[email protected]>
      5cee1942
    • Alfonso Subiotto Marqués's avatar
      exec: reset internal unsafeBatch in orderedAggregator · a558a372
      Alfonso Subiotto Marqués authored
      Not doing so could lead to correctness results. This was not caught by
      tests, so runTests has been extended to check for operators that can be
      initialized with a variable output size. This increases
      verifySelAndNullResets's test coverage, since it doesn't do anything if
      only a single batch is output, which is the case for most unit tests.
      
      Release note: None
      
      Release justification: This commit fixes correctness bugs and increases
      test coverage (Category 2).
      a558a372
    • Jordan Lewis's avatar
      Revert "sql,sqlbase,client: bootstrap TableDescriptor timestamps from MVCC" · 13b63943
      Jordan Lewis authored
      This reverts commit 5cffa361.
      
      Release note: None
      Release justification: reverts a buggy patch
      13b63943
    • Jordan Lewis's avatar
      Revert "roachlint: add linter to prevent calls to sqlbase.Descriptor.GetTable()" · ac147277
      Jordan Lewis authored
      This reverts commit 2bf4c57e.
      
      Release note: None
      Release justification: reverts a buggy patch
      ac147277
  3. 15 Sep, 2019 1 commit
    • craig[bot]'s avatar
      Merge #40757 · 99ba774d
      craig[bot] authored
      40757: sql: fix: EXPLAIN checks for VectorizeRowCountThreshold r=rafiss a=rafiss
      
      EXPLAIN recently was updated so it shows if a query is going to run on
      the vectorized engine. But it was not respecting row count thresholds,
      so the output was not accurate. Fix and test.
      
      Also, switch optlogic tests that were running on fakedist to 5node-dist
      to make the tests less flaky when checking if a query will run
      vectorized.
      
      Release justification: This fixes a bug with a new UX that is part of
      19.2, and also decreases test flakes.
      
      Release note: None
      Co-authored-by: 's avatarRafi Shamim <[email protected]>
      99ba774d
  4. 14 Sep, 2019 2 commits
    • craig[bot]'s avatar
      Merge #40657 · b4f40759
      craig[bot] authored
      40657: exec: Fix NULL expression handling in CASE and AND operators r=rohany a=rohany
      
      This change fixes the CASE and AND operators when nulls were used as
      expressions, which caused different errors than nulls existing as data
      within the batches. Additionally, this change increases the safety of
      the vectorized engine by disallowing the engine to plan
      constNullOperators without knowing the "type" of the null to avoid
      having the same panic arise. To get around this, when the "type" of the
      null is known, a constNullOperator with a known type can be planned.
      This is a temporary fix for the release. To be properly fixed, datum
      nulls need to be aware of their type post typechecking, instead of being
      "unknown".
      
      Release justification: This PR fixes known panics within the vectorized engine.
      
      Fixes #40526.
      
      Release note: None
      Co-authored-by: 's avatarRohan Yadav <[email protected]>
      b4f40759
    • Rohan Yadav's avatar
      exec: Fix NULL expression handling in CASE and AND operators · d3fc0c24
      Rohan Yadav authored
      This change fixes the CASE and AND operators when nulls were used as
      expressions, which caused different errors than nulls existing as data
      within the batches. Additionally, this change increases the safety of
      the vectorized engine by disallowing the engine to plan
      constNullOperators without knowing the "type" of the null to avoid
      having the same panic arise. To get around this, when the "type" of the
      null is known, a constNullOperator with a known type can be planned.
      This is a temporary fix for the release. To be properly fixed, datum
      nulls need to be aware of their type post typechecking, instead of being
      "unknown".
      
      Release justification: This PR fixes known panics within the vectorized engine.
      
      Fixes #40526.
      
      Release note: None
      d3fc0c24