question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support a more fine-grained datediff function in Impala (once it exists)

See original GitHub issue

Impala does not yet support a proper date difference (e.g. milliseconds between or nanoseconds between). While nanoseconds-between can yield int64 overflows on historical dates (pandas supports a little under 500 years range due to using nanosecond resolution), this is still decently useful.

Note that Impala’s datediff function is the only real “timedelta” function, but it only computes days between, which isn’t that useful in general.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mariusvniekerkcommented, May 20, 2017

I would test against a current install of impala. Best to verify what the current behavior is.

A less precise version should be possible by casting both timestamps to int64 and then compute the difference. This will return a delta in seconds if memory serves.

0reactions
cpcloudcommented, Nov 30, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Impala Date and Time Functions
Impala supports the following date and time functions: ADD_MONTHS; ADDDATE; CURRENT_DATE; CURRENT_TIMESTAMP; DATE_ADD; DATE_PART; DATE_SUB; DATE_TRUNC; DATEDIFF ...
Read more >
Impala Date and Time Functions | 6.3.x
Impala supports the following data and time functions: ADD_MONTHS · ADDDATE · CURRENT_TIMESTAMP · DATE_ADD · DATE_PART · DATE_SUB · DATE_TRUNC · DATEDIFF...
Read more >
Difference in days between two dates in Impala
I am trying to find a date difference In Impala. ... I know that there is no datediff function on Impala and I've...
Read more >
Apache Impala (incubating) Guide
Because the statestore's purpose is to help when things go wrong, it is not critical to the normal operation of an Impala cluster....
Read more >
Cloudera Impala | PDF | Trademark | License
Because the statestore's purpose is to help when things go wrong, it is not critical to the normal operation of an Impala cluster....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found