presto_sql_parser 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b741335f41c8bc843227d596cf676fe8dd100416ac711c7fb1f07a2d88d56d4
4
- data.tar.gz: e05a50a413fcbfb5a8f766230cca38b365e8dbd9da39dd3318b2f06e8f34aab2
3
+ metadata.gz: 914db19484a83d4dec4785bd05bccb7fca4f34fea03a9f01bc132d38cd2857e0
4
+ data.tar.gz: 79ba29657fec84702680fc96a413a7a90f618570c80a8033147185b7f2d57cc5
5
5
  SHA512:
6
- metadata.gz: 598c067b8400698a8f98891d1613e3fce210dd74d89caee448c3893dec92b55a7a1a8bdfe59d1e922c0b674168ea5f667a149b9622ac83f230d0fa93fa9b2a6c
7
- data.tar.gz: 7875622888caa489ddfc863a5a68fccb26cdf95610ecc46226d35f85ffe08b2aeec3e5460d8f564ef5057bb0a696c2ef5983bfcb1d83441b981ca0ac0edcee76
6
+ metadata.gz: f3a5df1ebc7deef137a3e6162f78216a4a96c54e4df3ec3e78234c62a04a313bbb4b0389d93f84ce17e38fa9e87b0657ce6937cb6a1ebf3e7af5716d3ceaed50
7
+ data.tar.gz: 270e33d525810824561f35b4e059aed05d8d636b737ba1a5d8fc12c2a39f6283dc93f7a6346988693b8de2af86d65d1a9642a35a2ecd3f6467687373dd8ac769
data/ChangeLog CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ 2019-08-02 version 0.4.0:
3
+
4
+ * Support process running more than idle_wait was killed unexpectedly
5
+
2
6
  2019-08-02 version 0.3.0:
3
7
 
4
8
  * Added support for PRESTO_SQL_PARSER_JAVA env var
data/README.md CHANGED
@@ -24,6 +24,38 @@ Or install it yourself as:
24
24
 
25
25
  `java` command must be available because this PrestoSqlParser needs to use Presto's jar file.
26
26
 
27
+ If `java` is not available, such as in a pre-built Docker container, you would install java using following script:
28
+
29
+ ```bash
30
+ if [[ ! -d ~/java/jre_11.0.4_11 ]]; then
31
+ mkdir -p ~/java
32
+ curl -L "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_linux_hotspot_11.0.4_11.tar.gz" | tar zx -C ~/java
33
+ mv ~/java/jdk-11.0.4+11-jre ~/java/jre_11.0.4_11
34
+ fi
35
+ echo 'export PATH=$HOME/java/jre_11.0.4_11/bin:$PATH' >> ~/.bashrc
36
+ ```
37
+
38
+ On Circle CI 2.0, you can add following configuration to `steps` section:
39
+
40
+ ```yaml
41
+ - type: cache-restore
42
+ key: jre_11.0.4_11
43
+ - run:
44
+ name: Install java
45
+ command: |
46
+ set -xe
47
+ if [[ ! -d ~/java/jre_11.0.4_11 ]]; then
48
+ mkdir -p ~/java
49
+ curl -L "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_linux_hotspot_11.0.4_11.tar.gz" | tar zx -C ~/java
50
+ mv ~/java/jdk-11.0.4+11-jre ~/java/jre_11.0.4_11
51
+ fi
52
+ echo 'export PATH=$HOME/java/jre_11.0.4_11/bin:$PATH' >> $BASH_ENV
53
+ - type: cache-save
54
+ key: jre_11.04_11
55
+ paths:
56
+ - ~/java
57
+ ```
58
+
27
59
  ## Usage
28
60
 
29
61
  Most typical use case is checking syntax error as following:
@@ -41,12 +41,11 @@ class PrestoSqlParser
41
41
  end
42
42
 
43
43
  def send_line(line)
44
- pipe = @mutex.synchronize do
44
+ @mutex.synchronize do # block kill! during execution
45
45
  start! unless @pipe
46
- @pipe
46
+ @pipe.puts line
47
+ @last_used_pid = @pipe.pid
47
48
  end
48
- pipe.puts line
49
- @last_used_pid = pipe.pid
50
49
  nil
51
50
  end
52
51
 
@@ -1,3 +1,3 @@
1
1
  class PrestoSqlParser
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presto_sql_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi