Cannot use NEGATIVE function on Float8 data type. What gives? - apache-drill

I am using the following:
Apache Drill 1.5.0
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
When I run the following query
SELECT NEGATIVE(`EX QTY`) as `quantity`, `contract_symbol`, `contract_expiration_month` FROM dfs.`BobBrokerJapanFutures.json` WHERE `B/S` = 'S'
I get an error saying
Query Failed: An Error Occurred
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: SchemaChangeException: Failure while trying to materialize incoming schema. Errors: Error in expression at index -1. Error: Missing function implementation: [negative(FLOAT8-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. Fragment 0:0 [Error Id: 0d38ceb9-c490-442b-87da-a22043093abd on vagrant-ubuntu-trusty-64:31010
This means I am not supposed to use negative on Float8, right?
But then when I used the same query but with ABS function, it worked perfectly.
What's going on?

I currently use
SELECT(`EX QTY` * -1) as `quantity`, `contract_symbol`, `contract_expiration_month` FROM dfs.`/src/Apps/BobBrokerJapanFutures.xlsx.json` WHERE `B/S` = 'S'
as a way to overcome this issue.

Related

Get frequent chrome driver error: driver config / start failed: chrome server returned empty list from http://localhost:(port) in karate standalone

I used to get frequent chrome driver error in karate UI tests. I have been using karate tests in VS code for the past 5 months. Now, I used to get driver config / start failed: chrome server returned empty list from http://localhost:[port] frequently. Sometimes, I need to run 20 times to run the same test to succeed. All other runs throws either "driver config / start failed: chrome server returned empty list" / "ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed"
I have installed chrome multiple times but I get the same error. Also I have re-imaged my laptop due this issue and through something went wrong. Even now I used to get the above errors often.
I have installed Chrome 64 bit in windows laptop, it get installed in "C:\Program Files\Google\Chrome\Application\chrome.exe" but karate standalone will always check the Chrome path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" in runtime which doesn't exists.
Note: I have set the chrome.exe installed path in my system environment PATH but karate not considering the path variable. Please advise me on this.
So I have modified the driver config as given below:-
* configure driver = { type: 'chrome', headless: true }
[To]
* configure driver = { type: 'chrome', executable: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: true }
Karate version: 0.9.6.RC3
OS : Windows 10 Home
JDK Version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
Chrome Driver config
configure driver = { type: 'chrome', executable: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: true }
Chrome Driver Errors
testui.feature:8 - driver config / start failed: chrome server returned empty list from http://localhost:54311, options: {type=chrome, executable=C:/Program Files/Google/Chrome/Application/chrome.exe, headless=true, target=null}
ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed:
[1.1:33] test_page.feature:9 - driver config / start failed: chrome server returned empty list from http://localhost:55676, options: {type=chrome, executable=C:/Program Files/Google/Chrome/Application/chrome.exe, headless=true, target=null}
ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed:
[1.1:33] test_page.feature:11 - evaluation (js) failed: input('#username', 'admin'), failed to get reply for: [id: 23, method: Input.dispatchKeyEvent, params: {modifier=0, type=keyDown, text=k}]
Please guide me how to resolve this issue.
Thanks,
Chandra
I was same error. Actually its finding chrome.exe in different location where actually its not located.
In default it's looking at "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
but actual path was 'C:/Users/ues/AppData/Local/Google/Chrome/Application/chrome.exe'
So check your chrome.exe path.
Hope it's helpful.
I have solved my problem by defining in the config file as;
"karate.configure('driver', { type: 'chrome', port: 9222,
executable: 'C://Program Files//Google//Chrome//Application//chrome.exe' });"
maybe assigning a port help me to solve the issue but one thing to consider here is that u need to use forward slashes in the executable command.
No one else has reported this, so you'll need to figure this out maybe with the help of someone who can troubleshoot your machine. Maybe there are some permission restrictions. Maybe your old processes are still running, so make sure you go to your task manager and kill them etc, this is quite common on Windows.
And please upgrade to 1.0 before trying anything else, because that may help: https://github.com/intuit/karate/wiki/1.0-upgrade-guide
Otherwise we will need your help to maybe debug and suggest changes to the framework. Ideally you should contribute code to Karate, and remember - it is an open source project. If you are able to replicate your problems, follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue - but I'm not sure that is possible with the kinds of issues you are describing.
If none of the above options work, you may need to consider switching to some other framework.
EDIT: most teams run on CI + Docker which is much more stable: https://stackoverflow.com/a/62325328/143475

Asterisk res_config_mysql module is missing

I have installed asterisk latest package and using mysql DB for realtime simulation. But in the CLI i am getting the error:
config.c:2444 find_engine: Realtime mapping for 'sippeers' found to engine 'mysql', but the engine is not available
and while executing command MODULE LOAD RES_CONFIG_MYSQL i am getting the following message.
loader.c:918 load_resource: Module 'RES_CONFIG_MYSQL' could not be loaded.
My machine is with linux mint 16. 64 bit.
If you have version <1.4 you have download asterisk-addons and compile it too
Otherwise you have do
make menuconfig
before make and select mysql addon

using 64bit mysql with R 32bit (64Bit Win7 )

RMySQL library works at R-64bit version.
but still it doesn't work with the 32bit R version
because I'm using statconn tools(DCOM, rcom) which only work with the 32 version R,
I need to access MySQL DB with R-32bit Version.
below are thing i've done till now.
install latest Rtools
install 64-bit MySQL Client( 32bit version doens't work)
C:\Program Files\R\R-2.12.1\etc\Renviron.site and add line like MYSQL_HOME=C:/mysql (path to your mysql files)
copy libmysql.lib to (mysql/lib/opt, R_HOME\bin, windows\system32)
install.packages('RMySQL',type='source')
set R_HOME, MYSQL_HOME to enviroment variables properly
add R_HOME, MYSQL_HOME, Rtools to path.
error messages :
RS-MySQL.o:RS-MySQL.c:(.text+0x2f23): undefined reference to `mysql_get_client_version#0'
RS-MySQL.o:RS-MySQL.c:(.text+0x2f44): undefined reference to `mysql_get_client_info#0'
RS-MySQL.o:RS-MySQL.c:(.text+0x2f71): undefined reference to `mysql_server_end#0'
collect2: ld returned 1 exit status
ERROR: compilation failed for package 'RMySQL'
* removing 'C:/Program Files/R/R-2.15.1/library/RMySQL'
how can i use 32bit R version with 64bit MySQL?
For your information.
"RODBC" library works with 64 bit R version, but 32 bit R version

Win64 compiling package from source: "sorry, unimplemented: 64 bit mode not compiled in"

Trying to install RMySQL on 64-bit Windows 7.
Using R-2.14.2 with Rtools214 and MySQL Server 5.5.
Read through several step-by-steps of RMySQL source installation.
Troubleshooting:
- Copied libmysql.dll to R-2.14.2/bin AND R-2.14.2/bin/i386.
- Copied libmysql.dll and libmysql.lib to MySQL Server 5.5\lib\opt.
- Entered MYSQL_HOME=C:\Program Files\MySQL\MySQL Server 5.5 into Renviron.site, saved to R\R-2.14.2\etc.
My instances of common problems:
Sys.getenv('MySQL_HOME')
[1] "C:\Program Files\MySQL\MySQL Server 5.5\"
install.packages('RMySQL', type = 'source')
Installing package(s) ...
...
RS-DBI.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
make: [RS-DBI.o] Error 1*
ERROR: compilation failed for package 'RMySQL'
...
I'm guessing my problem lies in the '64-bit mode...' message, but I'm not sure.
Thoughts?
I'm not sure this error message has anything to do with RMySQL, or any particular package.
On 64bit Windows, instead of the default PATH :
C:\Rtools\MinGW\bin
( gives the error sorry, unimplemented: 64-bit mode not compiled in )
you might (quite reasonably) notice the MinGW64 directory alongside and try :
C:\Rtools\MinGW64\bin
but in fact it needs to be :
C:\Rtools\gcc-4.6.3\bin
Then of course, stop and start a new DOS window to pick up the new PATH.
I had problems installing RMySQl
so I installed the package RODBC which works fine.
(make sure the MySQL driver is installed).
http://dev.mysql.com/downloads/connector/odbc/

Help with MySQL gem on OSX

I'm trying to get the mysql gem working on OSX 10.5.6, and feeling stymied.
% gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed
% irb -rubygems -rmysql
irb> Mysql.init
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Users/rampion/.gem/gems/mysql-2.7/lib/mysql.bundle
Expected in: dynamic lookup
dyld: Symbol not found: _mysql_init
Referenced from: /Users/rampion/.gem/gems/mysql-2.7/lib/mysql.bundle
Expected in: dynamic lookup
zsh: trace trap irb -rubygems -rmysql
%
I'm using the default install of ruby 1.8.6.
I'm using a 64-bit version of MySQL 5.0.77. mysqld is running and I can use the mysql shell, so I suspect my issue is with mysql.gem, though I'm by no means certain.
Can anyone offer any advice?
Ok. So the solution turned out to be I needed to be runing the 32-bit version of MySQL 5.0.77 in order for mysql.gem to work.