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

[WIP] Add sybase connector #2976

Closed
wants to merge 7 commits into from
Closed

[WIP] Add sybase connector #2976

wants to merge 7 commits into from

Conversation

tooptoop4
Copy link
Contributor

@tooptoop4 tooptoop4 commented Mar 1, 2020

Fixes #2481

Have manually tested against Sybase ASE:
show schemas, select count(1) with filters and without, select * without filters and with some where filters

things that might stop this being merged?

  1. jconn4 version that works (must be v16) is not on maven
  2. no tests
  3. not sure if this works for other than master database (perhaps jdbc conn string can help though) Sybase has 4 part format (but most other jdbc sources have 3 part): server.db.owner.table
  4. rebase/squash
  5. not sure if all data types get mapped properly
  6. not sure if write/alter operations work
  7. no aggregate pushdown (ie count, max,sum.etc)
  8. other unknowns? and review comments

todo: should this be specific to Sybase ASE? I've not tried on Sybase IQ yet

Some tests:

presto> select * from sybase.dbo.monTables where size between 100 and 105 and description like '%lust%';
tableid | columns | parameters | indicators | size | tablename | description | language
---------+---------+------------+------------+------+--------------+----------------------------------------------------+----------
61 | 19 | 0 | 4 | 104 | monCIPCMesh | Cluster IPC message statistics for the entire mesh | en_US
65 | 7 | 0 | 4 | 100 | monCIPCLinks | Cluster IPC message link status | en_US
(2 rows)

Query 20200301_225813_00002_uksth, FINISHED, 1 node
http://localhost:8080/ui/query.html?20200301_225813_00002_uksth
Splits: 17 total, 17 done (100.00%)
CPU Time: 0.0s total, 171 rows/s, 0B/s, 27% active
Per Node: 0.0 parallelism, 4 rows/s, 0B/s
Parallelism: 0.0
Peak Memory: 0B
0:01 [6 rows, 0B] [4 rows/s, 0B/s]

presto> show schemas from sybase;
Schema

dbo
dtm_tm_role
guest
ha_role
hadr_admin_role_gp
information_schema
js_admin_role
js_client_role
js_user_role
keycustodian_role
messaging_role
mon_role
navigator_role
oper_role
probe
public
replication_maint_role_gp
replication_role
sa_role
sa_serverprivs_role
sso_role
sybase_ts_role
usedb_user
webservices_role
(24 rows)

Query 20200301_230017_00003_uksth, FINISHED, 1 node
http://localhost:8080/ui/query.html?20200301_230017_00003_uksth
Splits: 19 total, 19 done (100.00%)
CPU Time: 0.1s total, 311 rows/s, 5.19KB/s, 23% active
Per Node: 0.2 parallelism, 57 rows/s, 971B/s
Parallelism: 0.2
Peak Memory: 0B
0:00 [24 rows, 409B] [57 rows/s, 971B/s]

presto> use sybase.dbo;
USE
presto:dbo> show tables;
Table

etshostresourceutilizationview
etsservicememoryview
etsservicestatisticsview
ijdbc_function_escapes
jdbc_function_escapes
monbucketpool
moncachedobject
moncachedprocedures
moncachedstatement
moncachepool
moncipc
moncipcendpoints
moncipclinks
moncipcmesh
monclmobjectactivity
monclustercachemanager
moncmsfailover
mondatacache
mondbrecovery
mondbrecoverylrtypes
mondeadlock
mondeviceio
mondevicesegmentio
mondevicesegmentusage
mondevicespaceusage
monengine
monerrorlog
monfailoverrecovery
monhadrmembers
monimrscacheactivity
monimrsgctasks
monimrspartitionactivity
moninmemorystorage
moniocontroller
monioqueue
monlatchfreeindex
monlicense
monlocks
monlocktimeout
monlogicalcluster
monlogicalclusteraction
monlogicalclusterinstance
monlogicalclusterroute
monmemoryusage
monnetworkio
monnvcache
monopendatabases
monopenobjectactivity
monopenpartitionactivity
monpcibridge

Query 20200301_230030_00006_uksth, FINISHED, 1 node
http://localhost:8080/ui/query.html?20200301_230030_00006_uksth
Splits: 19 total, 19 done (100.00%)
CPU Time: 0.1s total, 1.44K rows/s, 40.6KB/s, 39% active
Per Node: 0.1 parallelism, 196 rows/s, 5.54KB/s
Parallelism: 0.1
Peak Memory: 0B
0:01 [122 rows, 3.45KB] [196 rows/s, 5.54KB/s]

presto:dbo> select count(1) from sybase.dbo.monTables where size > 1;
_col0

102
(1 row)

Query 20200301_230632_00008_uksth, FINISHED, 1 node
http://localhost:8080/ui/query.html?20200301_230632_00008_uksth
Splits: 18 total, 18 done (100.00%)
CPU Time: 0.0s total, 3.4K rows/s, 0B/s, 19% active
Per Node: 0.0 parallelism, 136 rows/s, 0B/s
Parallelism: 0.0
Peak Memory: 0B
0:01 [102 rows, 0B] [136 rows/s, 0B/s]

presto:dbo> select count(1) from sybase.dbo.monTables;
_col0

102
(1 row)

Query 20200301_230637_00009_uksth, FINISHED, 1 node
http://localhost:8080/ui/query.html?20200301_230637_00009_uksth
Splits: 18 total, 18 done (100.00%)
CPU Time: 0.0s total, 6.8K rows/s, 0B/s, 23% active
Per Node: 0.0 parallelism, 320 rows/s, 0B/s
Parallelism: 0.0
Peak Memory: 0B
0:00 [102 rows, 0B] [320 rows/s, 0B/s]

presto:dbo> select count(1) from sybase.dbo.monTables where size > 100;
_col0

71 

(1 row)

Query 20200301_230917_00010_uksth, FINISHED, 1 node
http://localhost:8080/ui/query.html?20200301_230917_00010_uksth
Splits: 18 total, 18 done (100.00%)
CPU Time: 0.0s total, 4.73K rows/s, 0B/s, 18% active
Per Node: 0.0 parallelism, 198 rows/s, 0B/s
Parallelism: 0.0
Peak Memory: 0B
0:00 [71 rows, 0B] [198 rows/s, 0B/s]

@cla-bot cla-bot bot added the cla-signed label Mar 1, 2020
@mosabua
Copy link
Member

mosabua commented Oct 12, 2022

👋 @tooptoop4 - this PR has become inactive. If you're still interested in working on it, please let us know, and we can try to get reviewers to help with that.

We're working on closing out old and inactive PRs, so if you're too busy or this has too many merge conflicts to be worth picking back up, we'll be making another pass to close it out in a few weeks.

@mosabua mosabua closed this Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add sybase connector
2 participants