Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some relative date filters don't work for custom expression columns #35373

Closed
ranquild opened this issue Nov 3, 2023 · 0 comments · Fixed by #38488
Closed

Some relative date filters don't work for custom expression columns #35373

ranquild opened this issue Nov 3, 2023 · 0 comments · Fixed by #38488
Assignees
Labels
.Backend Priority:P2 Average run of the mill bug Querying/Processor .Team/QueryProcessor :hammer_and_wrench: Type:Bug Product defects
Milestone

Comments

@ranquild
Copy link
Contributor

ranquild commented Nov 3, 2023

Describe the bug

When using a relative date filter based on a column coming from a custom expression, we get "No results" while there are results for the selected range.

To Reproduce

  1. New -> Question
  2. Sample Database -> Orders
  3. Add a custom column Date with expression [Created At]
  4. Filter -> Date -> Relative dates -> Current -> Quarter
  5. Visualize
  6. See "No results" message
  7. Do the same with just Created At column
  8. You would get results

Regular column:
Screenshot 2023-11-03 at 17 34 52
Screenshot 2023-11-03 at 17 34 57

Custom column:
Screenshot 2023-11-03 at 17 34 40
Screenshot 2023-11-03 at 17 37 08
Screenshot 2023-11-03 at 17 34 35

Expected behavior

The results should be the same as if the underlying column was used

Logs

No response

Information about your Metabase installation

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.16+8-LTS",
    "java.vendor": "Azul Systems, Inc.",
    "java.vendor.url": "http://www.azul.com/",
    "java.version": "11.0.16",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.16+8-LTS",
    "os.name": "Mac OS X",
    "os.version": "12.1",
    "user.language": "en",
    "user.timezone": "Asia/Jerusalem"
  },
  "metabase-info": {
    "databases": [
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "2.1.214 (2022-06-13)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "2.1.214 (2022-06-13)"
      }
    },
    "run-mode": "dev",
    "version": {
      "date": "2023-11-03",
      "src_hash": "5529b6543b1b3382e1c7195c270b43e72688782f",
      "tag": "v0.48.0-SNAPSHOT",
      "hash": "e5bc88b"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Severity

P2

Additional context

No response

@ranquild ranquild added Type:Bug Product defects .Needs Triage .Backend Priority:P2 Average run of the mill bug .Team/QueryProcessor :hammer_and_wrench: Querying/Processor and removed .Needs Triage labels Nov 3, 2023
@snoe snoe self-assigned this Feb 6, 2024
@snoe snoe added this to the 0.48.6 milestone Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Backend Priority:P2 Average run of the mill bug Querying/Processor .Team/QueryProcessor :hammer_and_wrench: Type:Bug Product defects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants