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

feat: built-in function: Support hex() function #819 #2159

Merged
merged 12 commits into from
Jul 22, 2022

Conversation

HGZ-20
Copy link
Contributor

@HGZ-20 HGZ-20 commented Jul 12, 2022

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    feature

  • What is the current behavior? (You can also link to an open issue here)
    built-in function: Support hex() function #819

  • What is the new behavior (if this is a feature change)?
    built-in function: Support hex() function

@github-actions github-actions bot added the execute-engine hybridse sql engine label Jul 12, 2022
@HGZ-20 HGZ-20 changed the title built-in function: Support hex() function #819 feat: built-in function: Support hex() function #819 Jul 12, 2022
@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #2159 (0769892) into main (be78fe7) will increase coverage by 0.02%.
The diff coverage is 84.27%.

❗ Current head 0769892 differs from pull request most recent head a1a1f93. Consider uploading reports for the commit a1a1f93 to get more accurate results

@@             Coverage Diff              @@
##               main    #2159      +/-   ##
============================================
+ Coverage     75.75%   75.78%   +0.02%     
- Complexity      353      354       +1     
============================================
  Files           619      619              
  Lines        117301   117523     +222     
  Branches       1039     1039              
============================================
+ Hits          88864    89066     +202     
- Misses        28226    28246      +20     
  Partials        211      211              
Impacted Files Coverage Δ
src/client/ns_client.cc 46.80% <0.00%> (-0.15%) ⬇️
src/cmd/sql_cmd.h 26.51% <0.00%> (-0.21%) ⬇️
src/nameserver/name_server_impl.cc 42.78% <0.00%> (-0.04%) ⬇️
src/sdk/sql_cluster_router.cc 55.48% <0.00%> (ø)
src/sdk/sql_cluster_router.h 81.08% <0.00%> (-4.64%) ⬇️
src/sdk/sql_insert_row.h 40.00% <ø> (ø)
src/sdk/sql_router.h 33.33% <ø> (ø)
src/tablet/tablet_impl.cc 61.31% <75.00%> (+0.03%) ⬆️
src/base/file_util.h 79.14% <80.76%> (+0.76%) ⬆️
src/replica/snapshot_replica_test.cc 91.94% <92.65%> (+0.37%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be78fe7...a1a1f93. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

SDK Test Report

  77 files    77 suites   7m 16s ⏱️
165 tests 163 ✔️ 2 💤 0
206 runs  204 ✔️ 2 💤 0

Results for commit a1a1f93.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

HybridSE Linux Test Report

19 282 tests   19 280 ✔️  6m 49s ⏱️
     237 suites           2 💤
       67 files             0

Results for commit a1a1f93.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

HybridSE Mac Test Report

19 282 tests   19 280 ✔️  7m 0s ⏱️
     237 suites           2 💤
       67 files             0

Results for commit a1a1f93.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

Linux Test Report

       55 files       200 suites   52m 46s ⏱️
  9 231 tests   9 227 ✔️ 4 💤 0
13 582 runs  13 578 ✔️ 4 💤 0

Results for commit a1a1f93.

♻️ This comment has been updated with latest results.

hybridse/src/udf/udf.h Outdated Show resolved Hide resolved
hybridse/src/codegen/udf_ir_builder_test.cc Outdated Show resolved Hide resolved
hybridse/src/codegen/udf_ir_builder_test.cc Outdated Show resolved Hide resolved
hybridse/src/udf/default_udf_library.cc Outdated Show resolved Hide resolved
hybridse/src/codegen/udf_ir_builder_test.cc Outdated Show resolved Hide resolved
hybridse/src/codegen/udf_ir_builder_test.cc Outdated Show resolved Hide resolved
hybridse/src/codegen/udf_ir_builder_test.cc Outdated Show resolved Hide resolved
hybridse/src/udf/udf.cc Show resolved Hide resolved
hybridse/src/udf/udf.cc Outdated Show resolved Hide resolved
hybridse/src/udf/udf.h Outdated Show resolved Hide resolved
hybridse/src/udf/udf.h Outdated Show resolved Hide resolved
if (std::is_same<V, float>::value || std::is_same<V, double>::value) {
double numbuf = std::round(v);
if (numbuf < LLONG_MIN) ss << std::hex << std::uppercase << int64_t(LLONG_MIN);
else if (numbuf > LLONG_MAX) ss << std::hex << std::uppercase << int64_t(LLONG_MAX);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it really overflow ?

@aceforeverd
Copy link
Collaborator

merge after #2175 , it fix seg fault error here

@zhanghaohit
Copy link
Collaborator

merge after #2175 , it fix seg fault error here

@HGZ-20 Pls merge/rebase with main. It will fix the seg fault error.

@aceforeverd
Copy link
Collaborator

@zhanghaohit calling reviewer

@zhanghaohit
Copy link
Collaborator

Thanks @HGZ-20 for the contribution. It is now merged.

@zhanghaohit zhanghaohit merged commit 64af783 into 4paradigm:main Jul 22, 2022
@lumianph lumianph linked an issue Jul 25, 2022 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-engine hybridse sql engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

built-in function: Support hex() function
3 participants