-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
fixed invalid function date_trunc when connecting to hive -- issue#7270 #7657
Conversation
* Add new escape characters to OnPasteSelect * Add Unit Tests to onPasteSelect_spec * Update new line to tab escape character * Fix indentation in 2 cases
Wait I'm not sure if our Hive never worked in the explore view (too slow! times out), therefore this error never popped up, or if somehow |
* Apply dashboardFilter to dashboards * added missing comma
…ng the time_grain_functions -- issue#7270
…ng the time_grain_functions -- issue#7270
Codecov Report
@@ Coverage Diff @@
## master #7657 +/- ##
==========================================
+ Coverage 65.57% 65.58% +<.01%
==========================================
Files 435 435
Lines 21754 21757 +3
Branches 2394 2394
==========================================
+ Hits 14266 14269 +3
Misses 7367 7367
Partials 121 121
Continue to review full report at Codecov.
|
Yes you are absolutely right, I'm sorry, I should override the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeepxiaozi would you mind rebasing your change? It seems the PR currently has unrelated changes from #7660.
|
||
engine = 'hive' | ||
max_column_name_length = 767 | ||
time_grain_functions = { | ||
None: '{col}', | ||
'PT1S': "from_unixtime(unix_timestamp({col}), 'yyyy-MM-dd HH:mm:ss')", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeepxiaozi I don't believe this logic is correct, i.e., it's assuming that the {col}
is of type STRING
(with a pre-specified format) where it could be a DATE
or TIMESTAMP
. I plan to address this issue in SIP-15A but for the meantime I would suggest implying that {col}
can be successfully cast to a TIMESTAMP
, i.e., CAST({col} AS TIMESTAMP}
(see here for details) as this is consistent with the logic in the other engines.
I'll address the invalid casting in SIP-15A which I'm actively working on.
@jeepxiaozi |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
CATEGORY
SUMMARY
adding
time_grain_functions
to support hive date functionsADDITIONAL INFORMATION